# Theme toggle

> Light/dark toggle button and next-themes provider. Also mount the included `ThemeProvider` around your app root (e.g. in `layout.tsx`) — installing this item alone doesn't wire it up.

**BuildSpace v2.** Read https://ui.buildspace.studio/design.md first. Setup (fonts and namespace): https://ui.buildspace.studio/#install. The theme replaces Ink & Paper; review CSS changes before reinstalling in an existing project.

- **Name:** `theme-toggle`
- **Type:** component (`registry:ui`)
- **Registry item:** https://ui.buildspace.studio/r/theme-toggle.json

## Install

```sh
npx shadcn add https://ui.buildspace.studio/r/theme-toggle.json
```

## Dependencies

npm packages (installed automatically): `next-themes`, `lucide-react`

Registry items (installed automatically by the shadcn CLI):

- `@buildspace/buildspace` — BuildSpace item, see https://ui.buildspace.studio/r/buildspace.md
- `@buildspace/button` — BuildSpace item, see https://ui.buildspace.studio/r/button.md

> **Required first step:** add a `registries.@buildspace` entry to your project's `components.json` (`"@buildspace": "https://ui.buildspace.studio/r/{name}.json"`) before running the install command above — the shadcn CLI needs it to resolve the `@buildspace/*` dependency names above, even though this item itself installs from a full URL.

## Files

- `registry/new-york/theme-toggle/theme-toggle.tsx`
- `registry/new-york/theme-toggle/theme-provider.tsx`
