Components/Feedback & Utilities

ThemeProvider

@wrksz/themes + Base UI
npx shadcn@latest add @karan-ui/theme-provider
@wrksz/themes + Base UI•Feedback & Utilities

ThemeProvider Interactive Canvas

Unified application root provider orchestrating @wrksz/themes theme switching, native Base UI Toast & Tooltip providers, and Shadcn Typeset vertical rhythm measurements.

Canvas

Karan UI ThemeProvider

Base UI + @wrksz/themes

Unified provider combining @wrksz/themes, Base UI Toast, Base UI Tooltip, Shadcn Typeset rhythm measurements, and ColorTheme slot.

1. Theme (Dark / Light / Custom)
Powered by @wrksz/themes with custom themes array support
Active Theme: system (Resolved: )
2. Toast & Tooltip Providers
Automatic Base UI Toaster and TooltipProvider

Notice that no separate <Toaster> or <TooltipProvider> had to be written inside this demo.

3. Typeset Rhythm Measurements (Shadcn Typeset)
Three core controls (size, leading, flow) + measure dynamically adjusting reading rhythm
Presets:
--typeset-size16px
--typeset-leading1.65
--typeset-flow1.25em
--typeset-measure65ch

Typeset Typography Preview

Typeset brings intentional typography and proportional vertical rhythm to rendered content, prose, and chat bubbles.

When you switch presets above (e.g. from compact to reading), the line height, block spacing, and base size adjust instantaneously via CSS variables.

4. Geometry & Density Multipliers (Whitespace & Radius)
Realtime global scaling multipliers for element sizing/spacing and border radius
White-Space & Sizing MultiplierScales padding, margin, gap & dimensions (no text)
1.00x
Border Radius MultiplierScales rounded-* values proportionally (excl. none/full)
1.0x
Interactive Elements Reacting LiveWhitespace: 1.00x | Radius: 1.0x
rounded-sm BadgePill Badge

Props Controls

12 props
OklchColor ({ l, c, h })
number (0–100%)
number (0–100%)
'system' | 'light' | 'dark'
boolean
Enabled
'class' | 'data-theme' | 'data-mode'
'default' | 'docs' | 'chat' | 'reading' | 'compact' | 'large'
boolean | Partial<ToasterProps>
Enabled
boolean | Partial<TooltipProviderProps>
Enabled
number (0.5–2.0)
number (0–3.0)
string[]