深色模式
一键切换深浅两套配色:跟随系统 + 手动切换,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/