Skip to main content
  1. Docs
  2. Components
  3. Actions

Button

An action. One solid and one soft per region; everything else ghost.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<button>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Import

button.tsx
// From the package: a build keeps only what it uses.
import { Button } from "@qeetrix/react";

// Or from its own path.
import { Button } from "@qeetrix/react/button";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
variant"solid" | "soft" | "ghost""solid"Emphasis: primary, secondary, tertiary.
tone"brand" | "danger" | "neutral""brand"danger confirms a destructive flow; neutral is for ghost utility actions.
size"sm" | "md" | "lg""md"Height from the density tokens.
iconIconSource—A trailing icon from @qeetrix/icons, drawn sharp.
loadingbooleanfalseA spinner replaces the icon; clicks are ignored; aria-busy is set.
fullWidthbooleanfalseFills its container, its label centred on the whole button.
disabledbooleanfalseSets aria-disabled; the button stays focusable.
renderButton.Props["render"]—Another element through Base UI. For navigation, LinkButton: it's announced as a link.
childrenReactNode—The label: a verb.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
button<button>The root. data-variant, data-tone, data-size; data-icon, data-loading when set.
button-label<span>The label.
button-zone<span>The icon's zone, behind its rule.
button-icon<svg>The icon.
button-spinner<span>In the zone while loading.

05

Placement only

className and style place it; its look comes from the props and the tokens.

toolbar.tsx
<Button className="toolbar-end" variant="ghost" tone="neutral">Cancel</Button>
Next — ButtonAccessibility