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 Switcher

A theme switcher component for light, dark, and system modes.

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

Copy page

Import

React
npm i @velkin/react

import { VuThemeSwitcher } from "@velkin/react/theme-switcher";

Examples

API

Props

PropTypeDefaultDescription
darkIcon"ion:moon-outline""ion:moon-outline"Iconify id for dark preference.
lightIcon"ion:sunny-outline""ion:sunny-outline"Iconify id for light preference.
systemIcon"ion:desktop-outline""ion:desktop-outline"Iconify id for system preference.
typeVuThemeSwitcherType"button"`button` cycles on click; `switch` shows all three options.
colorVuThemeSwitcherColor"default"Token intent forwarded to the active control.
disabledbooleanfalseDisables interaction. Default: `false`.
sizeVuThemeSwitcherSize"md"Child button / tab size.
variantVuThemeSwitcherVariant"ghost"Visual variant for `type="button"` only.
radiusVuThemeSwitcherRadius"md"Corner preset (`none`/`sm`/`md`/`lg`/`full`). Default: `md`.
iconOnlybooleantrueSquare icon segments in `type="switch"`; cycling button is always icon-only.

Events

EventDetailDescription
vu-themeVuThemeSwitcherChangeDetailFired when the user changes preference.

Slots

SlotDescription
iconOptional slot to override the cycling button icon (`type="button"` only).

CSS parts

PartDescription
containerWrapper around the control.
buttonCycling `<vu-button>` when `type="button"`.
switchSegmented `<vu-tab>` when `type="switch"`.
iconTheme icon inside the active control.

Methods

MethodDescription
toggleTheme- Cycles preference light → system → dark and emits `vu-theme`.

Types

NameDefinition
VuThemeSwitcherChangeDetail
{ preference: ThemePreference; mode: "light" | "dark"; }
VuThemeSwitcherColor
"default" | "primary" | "success" | "warning" | "danger"
VuThemeSwitcherRadius
"sm" | "md" | "lg" | "none" | "full"
VuThemeSwitcherSize
"sm" | "md" | "lg"
VuThemeSwitcherType
"button" | "switch"
VuThemeSwitcherVariant
"solid" | "outline" | "soft" | "ghost" | "link"

Related

Theming

  • Config ProviderA config provider component for component defaults and presets.
  • Theme ProviderA theme provider component that supplies tokens and locale.

Guides

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

Browse

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