Command Menu

Search documentation, components, and switch theme.

Atoms

Mode Toggle

A theme toggle button for dark and light mode.

Formance
Docs

Installation#

npx shadcn@latest add @formance/mode-toggle

Install the following dependencies:

npm install lucide-react

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage#

import { ModeToggle } from '@/components/ui/mode-toggle'
<ModeToggle theme={theme} setTheme={setTheme} />