Skip to content

The Button Component

The main function of the Button component is to trigger an action when clicked.

TriggerComponent

例子

ts
if (_.xButton("Click me", disabled)) {
  alert("Clicked!");
}

Param: children

type: D<Content>

The content of the button.

Param: disabled

optional
= false

type: D<boolean>

Whether the button is disabled.

Triggered when: click

data type: void (Can be MouseEvent)

When the button is clicked, the event will be emitted.