Button
The primary interactive element. Supports variants and semantic intent colors.
Variants
primary, secondary, ghost — the shape of the interaction.
Intent — Primary
primary variant across all semantic meanings.
Intent — Secondary
secondary variant with semantic intent.
Intent — Ghost
ghost variant with semantic intent.
Sizes
sm, md, lg.
Disabled
Disabled state across variants.
With Icons
Buttons containing an icon alongside text.
Icon Only
A square button designed to perfectly center a single icon using the 'icon' size variant.
Split Button
Compose a MayaBtnGroup with a dropdown menu to offer secondary actions attached to the main button.
MayaBtn Props API
| Prop / Event | Type | Default | Description |
|---|---|---|---|
variant | String | "primary" | The visual style. Options: "primary", "secondary", "ghost", "outline". |
size | String | "md" | The sizing of the button. Options: "sm", "md", "lg", "icon". |
intent | String | "default" | The semantic color intent. Options: "default", "success", "warning", "danger", "info". |
disabled | Boolean | false | Whether the button is disabled and unclickable. |
@click | Event | — | Emitted when the button is clicked. Passes the native MouseEvent. |
#default | Slot | — | The default slot for the button content (text, icons). |