UI / Components / brand / ThemeProvider

ThemeProvider

App-wide theme context with CSS variables.

Root provider that sets a `data-theme` attribute on `<html>` based on user choice + system preference. Themes flip CSS variables (`--background`, `--text-primary`, etc.) so every component re-skins automatically.

$npx dock-ui add theme-provider

Usage

import { ThemeProvider } from "@/components/ui/theme-provider";

<ThemeProvider defaultTheme="dark">
  <App />
</ThemeProvider>

Install

via CLI
$ npx dock-ui add theme-provider
Writes the file(s) directly to your components/ui/ folder. You own the code.
For agents
curl -L https://ui.trydock.ai/r/theme-provider.json
Returns a JSON manifest with file paths + contents. Agent-readable, LLM-fetchable.
← All components
Themes·Component kit · glossary
View on GitHub →