指南 / 内容展示

深色模式

一键切换深浅两套配色:跟随系统 + 手动切换,vibe coder 问 AI 最多的问题之一。

在线演示

深色模式示例卡片

实现提示词

标准

Dark mode for the whole site: toggle button (top right), persists the choice, follows the system by default.

含动效

Dark mode toggle with 300ms smooth theme crossfade via CSS variables, persisted to localStorage, respects prefers-color-scheme.
设计规范条目
### Dark Mode (#darkmode)

Category: Content Display

Dark mode toggles two palettes in one tap—follows system plus manual switch, one of the most-asked AI questions.

- Do: Dark mode for the whole site: toggle button (top right), persists the choice, follows the system by default

With motion: Dark mode toggle with 300ms smooth theme crossfade via CSS variables, persisted to localStorage, respects prefers-color-scheme.

Live demo: https://uidesignmd.com/guides/darkmode/

规范包

从所选指南中导出实现规则和链接。

已选指南 0 / 20