A single clickable action. Use Primary for the page's main action. Use Ghost or Link for low-emphasis affordances. Use Danger only for destructive operations. If you need two actions side-by-side that should feel like peers, use the same variant on both.
Low-emphasis secondary action — Ghost or Secondary
Inline text-link styled action — Link variant
When not to use
Navigation between routes — use a Link/anchor instead (semantic <a>)
Toggling a state visible to the user — use Switch or Checkbox
Selecting one of N exclusive options — use SegmentedControl or RadioGroup
Compact decorative chip without action — use Badge
Accessibility
Role: button
Enter — Activates the button
Space — Activates the button (when focused)
Tab — Moves focus to/from the button
Screen reader: Reads label content + any aria-label/title. Sets `aria-busy=true` while `loading`. `disabled` removes from focus order entirely.
Notes: `variant: icon` REQUIRES the `title` prop — without it, screen-reader users have no label. The codegen audit fails the build if any `<Button variant=icon>` lacks a title.
ButtonGroup is the canonical wrapper for related actions. It keeps spacing, alignment, attached clusters, and equal-width footer controls consistent so a toolbar or form footer does not invent its own action rhythm.
Readiness
complete
Preview
live
Props
6
Examples
2
Code
implementation mapped
When to use
Related actions in a form footer, panel header, or toolbar
Peer actions that must keep equal visual weight
Attached button clusters where the group reads as one control
Mobile stacks where the same actions should become vertical
When not to use
Exclusive selection between options; use SegmentedControl or RadioGroup
Navigation lists; use anchors, tabs, or ItemButton depending on behavior
One standalone action; use Button directly
Accessibility
Role: group
Tab — Moves through each child button in document order
Screen reader: Announces the group label followed by each button label.
Notes: The group should contain real buttons. Do not place unrelated actions in one group.
Props
Name
Type
Default
Description
direction
enum: row | column
row
Primary layout direction for the group.
gap
enum: xs | sm | md
sm
Spacing between actions when the group is not attached.
align
enum: start | center | end | stretch
start
Cross-axis alignment.
equal_width
boolean
false
Makes child actions share available width.
attached
boolean
false
Removes the gap and attaches neighbouring button borders.
aria_label
string
Related actions
Accessible label for the action group.
Examples
Panel footer
A panel footer with cancel and save actions.
YAML
type: button-group
props:
gap: sm
align: center
aria_label: Panel actions
children:
- type: button
props:
variant: ghost
slots:
default: Cancel
- type: button
props:
variant: primary
slots:
default: Save changes
Attached toolbar
Attached toolbar controls for a compact command cluster.
CloseButton is the canonical dismiss control. It gives every dialog, drawer, sheet, and floating panel the same target size, icon, hover state, focus ring, and accessible label.
Readiness
complete
Preview
live
Props
5
Examples
2
Code
implementation mapped
When to use
Dismissible dialog or modal header
Panel, drawer, sheet, or overlay chrome
Temporary inline surface that has an explicit close action
When not to use
Navigation back to a previous route; use a back link or breadcrumb
Cancelling a form with potential data loss; use an explicit Button label
Closing a process that keeps running; use Stop or Cancel copy instead
Accessibility
Role: button
Enter — Activates the close action
Space — Activates the close action
Escape — Belongs on the surrounding dismissible surface, not this button
Screen reader: Reads the label prop, defaulting to Close.
Notes: Use a specific label such as 'Close browser panel' when multiple surfaces are present.
Props
Name
Type
Default
Description
label
string
Close
Accessible label and tooltip.
size
enum: small | medium | large
medium
Square hit-target size.
placement
enum: inline | absolute-top-right
inline
Inline flow or top-right anchored placement.
disabled
boolean
false
on_close
string
—
Examples
Dialog close
Dialog header close affordance.
Invite teammate
YAML
type: stack
props:
gap: sm
direction: row
align: center
children:
- type: text
props:
kind: heading
value: Invite teammate
- type: close-button
props:
label: Close invite dialog
size: small
Anchored close
Absolute close button inside a positioned preview surface.
Panel content with a canonical dismiss target.
YAML
type: container
props:
class: showcase-positioned-surface
children:
- type: text
props:
kind: muted
value: Panel content with a canonical dismiss target.
- type: close-button
props:
label: Close panel
placement: absolute-top-right
CopyButton is the standard way to copy tokens, URLs, IDs, commands, and short snippets. It keeps clipboard handling, success state, icon, target size, and accessible status consistent across the platform.
Readiness
complete
Preview
live
Props
6
Examples
2
Code
implementation mapped
When to use
Copying API tokens, webhook URLs, invite links, or command snippets
Compact code or identifier rows where the copied value is visible nearby
Inline tool chrome that needs immediate success feedback
When not to use
Long editable text; use a textarea or code block with native selection
Downloading files; use a download action
Copying destructive commands without surrounding warning copy
Accessibility
Role: button
Enter — Copies the value
Space — Copies the value
Screen reader: Announces Copy before activation and Copied after activation.
Notes: The copied value must be available in surrounding text or described by context.
Props
Name
Type
Default
Description
value*
string
—
String copied to the clipboard.
label
string
Copy
Idle label and accessible name.
copied_label
string
Copied
Label and accessible name after activation.
variant
enum: icon | button
icon
Icon-only or visible text button.
disabled
boolean
false
on_copy
string
—
Examples
Token copy
Copy an API token suffix from a settings row.
sk-live-...7f29
YAML
type: stack
props:
gap: sm
direction: row
align: center
children:
- type: text
props:
kind: muted
value: sk-live-...7f29
- type: copy-button
props:
value: sk-live-demo-7f29
label: Copy token
FloatingActionButton is a rare, high-salience action for constrained canvases and mobile surfaces. It should announce one obvious create or add action and must not be the only way to perform that action.
Readiness
complete
Preview
live
Props
6
Examples
2
Code
implementation mapped
When to use
Primary create action on a dense canvas or mobile surface
A bounded tool surface where a persistent action would otherwise disappear
Inline showcase or settings previews using placement: inline
When not to use
Desktop page footers where a normal Button is visible
Multiple competing actions; use a toolbar or ButtonGroup
Navigation, destructive actions, or hidden menus without a fallback path
Accessibility
Role: button
Enter — Activates the FAB
Space — Activates the FAB
Screen reader: Reads the required label prop.
Notes: Always provide another visible route to the same action in the surrounding UI.
Props
Name
Type
Default
Description
label*
string
—
Accessible label and tooltip.
icon
string
plus
Icon key from the Triform icon registry.
placement
enum: inline | bottom-right | bottom-center
bottom-right
Inline preview or fixed viewport placement.
tone
enum: primary | neutral | danger
primary
Semantic visual tone.
disabled
boolean
false
on_click
string
—
Examples
Create action
Inline preview of the canonical create affordance.
YAML
type: floating-action-button
props:
label: Create element
icon: plus
placement: inline
An icon-only square button used in toolbars, table-row actions, and close affordances. Differs from `Button variant=icon` only in that the Rust component is exported separately for ergonomics — both flow through the same dispatch. The `title` prop is required so screen readers and keyboard users have a label.
ItemButton turns a full-width row into a real button. Use it for picker rows, command lists, and drill-in rows where the whole row activates one action and should feel keyboard-reachable.
Readiness
complete
Preview
live
Props
2
Examples
1
Code
implementation mapped
When to use
Selecting an item from a command or picker list
Opening details from a full-width row
Rows that need hover, focus, disabled, and activation states
When not to use
Navigation to a URL; use an anchor or route link
Rows with multiple independent actions; use a row layout plus separate buttons
Static list content with no activation behavior
Accessibility
Role: button
Enter — Activates the row
Space — Activates the row
Tab — Moves focus to and from the row
Screen reader: Reads the row content as the button label.
Notes: Keep secondary text concise so the button label remains understandable.
Use when an action should read visually as a link but must behave as a button (it runs an action, it is not navigation). Carries loading/disabled states and an `on_click` action ref, rendered through the canonical Button primitive with its link variant — so focus, keyboard, and disabled semantics are correct, unlike a styled anchor.
Readiness
complete
Preview
live
Props
4
Examples
2
Code
implementation mapped
When to use
An inline, low-emphasis action that should look like a link
A tertiary action beside primary/secondary buttons
When not to use
Real navigation to a URL/route — use an anchor / router link
A primary call to action — use a button with a solid variant
An icon-only control — use the icon-button variant
Accessibility
Role: button
Enter — Activates the action
Space — Activates the action
Screen reader: Announced as a button (not a link), using the `title` as its accessible label. Because it is a real button it is keyboard-operable and respects the disabled state — the reason to prefer it over a styled <a>.
Notes: `title` doubles as the accessible label; always set it when the visible text is ambiguous out of context.
Props
Name
Type
Default
Description
title
string
—
Accessible label (aria-label) for the control.
loading
boolean
false
Shows the button's loading state and suppresses activation.
disabled
boolean
false
Disables the control.
on_click
string
—
Action ref invoked on activation (e.g. ${actions.dismiss}).
Examples
Link-styled action
A low-emphasis 'Learn more' inline action.
YAML
type: link-button
props:
title: Learn more
slots:
default:
- type: text
slots:
default: Learn more
Disabled link-button
A disabled tertiary action.
YAML
type: link-button
props:
title: Skip for now
disabled: true
slots:
default:
- type: text
slots:
default: Skip for now
SegmentedControl is for compact, mutually exclusive mode and filter choices. It looks like a button cluster, behaves like a radiogroup, and should only contain short options that can be scanned quickly.
Readiness
complete
Preview
live
Props
7
Examples
2
Code
implementation mapped
When to use
Switching a dense panel between modes such as List, Graph, Trace
Filtering a table or board to one of a few known states
Choosing a compact display density or inspection mode
When not to use
Navigation across pages; use tabs or links
Long option labels or explanatory choices; use RadioGroup or RadioCardGroup
Independent toggles where more than one option can be active
Accessibility
Role: radiogroup
ArrowLeft — Selects the previous enabled segment
ArrowRight — Selects the next enabled segment
ArrowUp — Selects the previous enabled segment
ArrowDown — Selects the next enabled segment
Tab — Moves focus to and from the control
Screen reader: Each segment is announced as a radio option with checked state.
Notes: Use a clear aria_label when the visible labels are terse.
SplitButton presents one default command and a small menu of related variants. It keeps the main path fast while keeping rarer variants discoverable and keyboard reachable.
Readiness
complete
Preview
live
Props
8
Examples
2
Code
implementation mapped
When to use
A default action has a few related variants, such as Run plus Dry run
Operational commands where the primary path should stay one click away
Toolbar actions that need a compact variant picker
When not to use
Unrelated menu items; use DropdownMenu or ContextMenu
More than five variants; use a menu button with grouped content
Actions with equal importance; use ButtonGroup
Accessibility
Role: group
Enter — Activates the focused button
Space — Activates the focused button
ArrowDown — Opens the variant menu
Escape — Closes the variant menu
Screen reader: Primary button and menu toggle are separate controls inside one group.
Notes: The primary label must describe the default action, not the whole menu.
Props
Name
Type
Default
Description
label*
string
—
Primary action label.
items*
array
—
Menu items as { value, label, danger?, disabled? } objects.