Docs (4.0.0)
class UITheme property

styles

A map that defines a set of predefined styles.

styles: Map<string, UIStyle.StyleSelectorList<any>>

Notes

  • This map includes base style definitions that are applied to instances of UIStyle. Each key is a base style name, and each value is a list of style definitions (as an array). To change the base appearance of UI components, preferably add objects with style definitions to each array. The format of style definitions is the same as the arguments of UIStyle.extend.
  • These style definitions are used by default styles (and any extensions or overrides) available as static properties of ui.style(), e.g. ui.style.BUTTON.

Example

useWebContext((options) => {
  options.theme.styles.set("Button", [
    ...options.theme.styles.get("Button")!,
    { minHeight: 48 },
  ]);
  // ... (apply the same to other button styles)
});

Related

  • class UIThemeA collection of default style options, colors, animations, effects, and icons, part of the global application context.