Add a dark mode toggle
“Add dark mode to my app with a sun and moon toggle button in the navigation bar. Switching should be instant. Start in whichever mode the visitor's device is already set to.”
Free AI prompt · The Design Book
A ready-to-use prompt from the chapter Dark Mode. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.
“Review my dark mode color palette. Make sure I am not using pure black or pure white. The background should be a dark gray, text should be slightly off-white, and cards should be a lighter shade than the background. Fix any contrast issues.”
“Add dark mode to my app with a sun and moon toggle button in the navigation bar. Switching should be instant. Start in whichever mode the visitor's device is already set to.”
“Create a dark color palette for my app. The current light colors are [list colors]. Generate dark equivalents that maintain contrast and readability.”
“Add dark mode to my website. Put a sun and moon toggle button in the navigation bar so people can switch with one click. Make the site start in dark mode if the visitor's device is already set to dark mode, and remember their choice next time they visit. Make sure the page never flashes the wrong colors when it first loads.”
“Update my site to use this design system. Colors: Primary [#hex], Secondary [#hex], Background [#hex], Text [#hex], Accent [#hex]. Fonts: Headings [font name] bold, Body [font name] regular. Apply these consistently across all components (buttons, links, headings, card backgrounds, borders, and hover states). Make sure there's enough contrast for readability.”
“I'm uploading a screenshot of a website design I like. Please recreate this layout and visual style for my [type of project]. Use my color palette: Primary [#hex], Secondary [#hex], Background [#hex]. Use [font name] for headings and [font name] for body text. Match the spacing, typography hierarchy, and overall feel as closely as possible. Build it with Next.js and Tailwind CSS.”
“I'm uploading a UI design I created in Google Stitch. Please recreate this exact design as a working website. Use my color palette: Primary [#hex], Secondary [#hex], Background [#hex]. Match the layout, fonts, spacing, and component styles as closely as possible. Build it with Next.js and Tailwind CSS.”