Button Component Props

Hierarchy

Properties

color?: PBColor4

Color of the label.

Default Value

{ r: 1, g: 1, b: 1, a: 1 }

disabled?: boolean

Enable or disable the pointer events on the button

font?: UiFontType

Label font type.

Default Value

'sans-serif'

fontSize?: ScaleUnit

Label font size.

Default Value

10

key?: Key

Uinique key to identiy elments when iterating arrays

onMouseDown?: Callback

triggered on mouse down event

onMouseUp?: Callback

triggered on mouse up event

textAlign?: TextAlignType

Label align position.

Default Value

'middle-center'

uiBackground?: UiBackgroundProps

To define a background color or image

uiTransform?: UiTransformProps

Layout component, to position things in the canvas

value: string

Primary content.

variant?: "primary" | "secondary"

Use any of the available button style types to create a styled button.