Rate this page:
A button that triggers an event or action. A row of buttons is displayed in a ButtonSet.
1 2import ForgeUI, { Button } from '@forge/ui';
Name | Type | Required | Description |
---|---|---|---|
onClick | () => void | Promise<void> | Yes | An event handler that can be asynchronous. You can execute state updates inside this function. |
text | string | Yes | The button's label text. |
appearance | string | The appearance of the button. Valid values are danger ,
default , link , subtle , subtle-link ,
and warning . Defaults to default . | |
disabled | boolean | Whether the user interaction is disabled. Defaults to false. | |
icon | string | An icon to display with the button's text. Valid values are
icons from
@atlaskit/icon.
For example, "add-circle" or "graph-line" . | |
iconPosition | "before" | "after" | Where to render the icon relative to the text . Defaults to "before". |
1 2<Button text="Sign up" onClick={async () => { await postSignup(data); }} />
Rate this page: