Theme Toggle from the classic Designer vs Developer meme.
pnpm dlx shadcn@latest add https://atlasui.dev/r/fancy-theme-toggle-html.json
Create a button element with role="switch" and id="theme-toggle". Rest of the logic is handled by script.js
role="switch"
id="theme-toggle"
script.js
<button role="switch" id="theme-toggle"></button>
On This Page
Contribute