Button
Clickable action trigger.
On this page
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label required | string | FieldReference | None | Button text |
action | ActionTarget | FieldReference | None | Action to execute on click |
successLink | TableRowLink | None | Navigate after success |
link | string | FieldReference | None | URL to navigate to |
overlay | string | None | Open a host overlay surface by its contribution ID, when the host supports it |
successOverlay | string | None | Open an overlay only after the action succeeds |
icon | string | FieldReference | None | Icon name |
description | string | FieldReference | None | Tooltip text |
kbd | string | FieldReference | None | Keyboard shortcut hint |
confirmation | | {
title: string;
description: string;
confirmLabel?: string;
}
| FieldReference | None | Confirmation dialog before execution |
variant | "primary" | "secondary" | "danger" | "list-item" | "secondary" | Visual style |
Example
ts
Button({ label: "Submit", action: save(), variant: "primary" })
Button({
label: "Delete",
action: deleteItem({ id: row.id }),
variant: "danger",
confirmation: { title: "Delete item?", description: "This cannot be undone." },
})