Skip to content

Config Provider

YhConfigProvider provides global configuration for the component library, including theme colors, internationalization, component sizes, and more.

Theme Switching

Use the theme prop to switch theme colors dynamically. Overriding with HEX values is fully supported.

Theme Switching

Global Component Size

When size is configured, all internal YH-UI components will adapt to it.

Global Size

Full Configuration Example

Demonstrates how to configure theme, language, and size together in a local environment.

MessageActive
Full Configuration

API

Props

PropDescriptionTypeOptionsDefault
themeGlobal themestringHex color / purpledefault
localeLocale configLanguagezhCn
sizeGlobal size'large' | 'default' | 'small''default'
globalInject into :rootbooleantrue

Released under the MIT License.