ValyroUI Русская версия

Theme Customizer

Theme customizer: presets, colors, radius, font and a live preview. Pro · Landing pages and brand › Brand and design system

A theme editor: presets, the four brand colours, corner radius and font, with a live preview built from the kit's own components on the resulting --ui-* tokens, in light or dark.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add theme-customizer
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ThemeCustomizer } from 'valyro-ui-pro';

Props

PropTypeDefault
presets *ThemePreset[]Ready-made palettes.
fonts *ThemeFont[]Fonts to choose from.
valueThemeSettingsThe settings (controlled).
defaultValueThemeSettingsInitial value when uncontrolled.
onValueChange(value: ThemeSettings) => voidCalled with the new value when it changes.
onSave(value: ThemeSettings, css: string) => voidShows "Save theme", enabled while the settings differ from the last save; called with the settings and the same theme as CSS custom properties (themeSettingsCSS), ready for a stylesheet.
previewExtraReactNodeExtra content inside the preview, under the mock app.
headingLevel1 | 2 | 3 | 4 | 5 | 62Level of the title (default 2).
labelsPartial<ThemeCustomizerLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Footer · Next: Color Token · All Landing pages and brand