Theme Provider

Context provider for light/dark theme switching. Install Theme Provider from the VLLNT UI registry with the shadcn CLI.

Report a bug

Context provider for light/dark theme switching. Part of the utility family in VLLNT UI, it ships as a machine-readable registry entry — copy the source directly into your app with the shadcn CLI and own it, no runtime dependency on a component library.

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Installation

Add Theme Provider to your project with the shadcn CLI. The source lands in your codebase, ready to adapt:

pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/theme-provider.json

Source

"use client"; import { ThemeProvider as NextThemesProvider, type ThemeProviderProps, } from "next-themes"; export function ThemeProvider({ children, ...props }: ThemeProviderProps) { return <NextThemesProvider {...props}>{children}</NextThemesProvider>; }

Stories

Explore every variant and state in the interactive Storybook:

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Dependencies

  • @vllnt/ui@^0.3.0