Docs (4.0.0)
ui method

button

Creates a preset UIButton constructor using the provided options.

static

button(preset: ui.PresetType<UIButton>, label?: BindingOrValue<string | LazyString>, onClick?: string, style?: UIVariant<UIButton> | UIStyle.TypeOrOverrides<UIButton.StyleType>): ViewClass<UIButton>

button(label?: BindingOrValue<string | LazyString>, onClick?: string, style?: UIVariant<UIButton> | UIStyle.TypeOrOverrides<UIButton.StyleType>): ViewClass<UIButton>

Parameters

  • preset — The properties, bindings, and event handlers that will be preset on each instance of the resulting class
  • label — Preset button label
  • onClick — Preset Click event specifier (optional)
  • style — Preset button style (optional)

Return value

A new class that extends UILabel

Related

  • uiAn object with functions for creating UI components and other resources.