atom

gy-button

Base action primitive of the gyrum design system; variant and size drive the visual contract, disabled and loading drive behaviour.

Live

What you ship.

Markup

<gy-button variant="primary" size="md">Ship it</gy-button>

Prop space

Tier atom
Tag gy-button
Variants primary · secondary · ghost · danger
Sizes sm · md · lg
PropTypeDefaultDescription
variant 'primary' | 'secondary' | 'ghost' | 'danger''primary'Visual emphasis. `primary` is the default call-to-action.
size 'sm' | 'md' | 'lg''md'Control density. `md` is the default.
disabled booleanfalseDisables interaction and blocks the click.
loading booleanfalseShows an inline spinner and blocks the click while an async action runs.
fullWidth booleanfalseStretches the button to the full width of its container.
onclick (ev: CustomEvent<MouseEvent>) => void; /** The button label. */ children?: Snippet; no defaultHandler for the gy-click CustomEvent. Suppressed while disabled or loading.

Where this lives

import '@gyrum-labs/components/button/button.js';
Owner
gyrum-ui
Build state
registered-and-built