Browse components
Dark Mode Toggle
Compact sun and moon switch that persists theme preference and toggles the document dark class.
Add to your project
1Connect the Uniquel MCP
Connect Uniquel to your coding agent before using the component ID.
Connect MCP2Copy the component ID
component:navigation/dark-mode-toggleWorks with your AI tools
* Compatible with most projects that use the default React/Next.js framework.
Built With
Props
| Prop | Type | Description |
|---|---|---|
storageKey | string | localStorage key for the saved theme |
applyToDocument | boolean | Toggle the dark class on documentElement |
defaultDark | boolean | Initial theme before storage is read |
onChange | (dark: boolean) => void | Fired when the theme changes |
className | string | Styles for the switch |
More Navigation Components
Compact next button with a looping arrow reveal, crisp press feedback, and loading and disabled states.
New: Coverflow Gallery is live — explore the catalog. See what's new
Restrained product update strip with gradient sheen and a clean collapse dismiss.
Minimal locale control with scaled blur-sm menu and staggered options — no native select chrome.
Numbered pagination that keeps the current page visible and collapses long ranges with ellipses.
Compact pagination controls with arrows and dots by default, plus optional page numbers.