Docs (4.0.0)
class UIVariant constructor

new UIVariant

Creates a new UI component variant object.

constructor(type: new () => T, preset: Readonly<View.ViewPreset<T>>)

Notes

  • The resulting instance can be used with ui functions such as ui.button(...), and in JSX tags for UI controls and containers.

Parameters

  • type — The UI component class that the variant will be used with, e.g UIButton
  • preset — The properties, bindings, and event handlers that will be preset on each object created with this variant

Related

  • class UIVariantAn object that includes predefined properties for a UI component.