Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Theme Provider

A theme provider component that supplies tokens and locale.

vu-theme-provider · @velkin/react/theme-provider

Copy page

Import

React
npm i @velkin/react

import { VuThemeProvider } from "@velkin/react/theme-provider";

Examples

API

Props

PropTypeDefaultDescription
themeVuThemeConfig—Brand seeds (`primary`, intents, `radius`, `spacing`, `tint`, fonts) plus optional per-mode seeds and raw `vars`.
scopeVuThemeProviderScope"root"Where CSS variables are applied. Default: `"root"`.
preferenceThemePreference"system"Stored UI preference. Default: `"system"`.
persistbooleantruePersists preference to localStorage when scope includes root. Default: `true`.
broadcastbooleantrueEmits global theme events when the active mode changes. Default: `true`.
localestring"en"BCP 47 locale for built-in `msg()` strings. Default: `"en"`.
injectStylesbooleantrueWhen false, skips injected token styles. Default: `true`.
vibrantpalettebooleanfalseHigher-contrast soft intent foregrounds. Default: `false`.
glassbooleantrueApp-wide glassmorphism for elevated surfaces and overlays. Does not paint a page background gradient — set your own. Default: `true`.

Events

EventDetailDescription
vu-themeVuThemeProviderChangeDetailBubbles when broadcast is true.

Slots

SlotDescription
—- App subtree that inherits theme tokens and locale.

Methods

MethodDescription
setPreference- Sets preference, optionally persists, and emits theme events when broadcast is true.
togglePreference- Cycles preference light, dark, then system.

Types

NameDefinition
ThemePreference
"light" | "dark" | "system"
VuThemeProviderChangeDetail
{ mode: "light" | "dark"; preference: ThemePreference; }
VuThemeProviderScope
"both" | "root" | "host"

Related

Theming

  • Config ProviderA config provider component for component defaults and presets.
  • Theme SwitcherA theme switcher component for light, dark, and system modes.

Guides

  • ThemingTokens and VuThemeProvider
  • StylingCSS parts and tokens
  • Appearancevariant, color, tone, size

Browse

  • Previous: Config ProviderEarlier in the sidebar
  • Next: Theme SwitcherLater in the sidebar
  • All componentsBrowse the full index