Primary
Solid system blue — main call to action.
Triggers an action — glass secondary by default, with solid primary, ghost, and danger variants.
Live
<button type="button" class="btn btn-primary">Continue</button>
<button type="button" class="btn">Secondary</button>
<button type="button" class="btn btn-ghost">Ghost</button>
<button type="button" class="btn btn-danger">Delete</button>
import { Button } from 'caustica-design/core'
<Button variant="primary">Continue</Button>
<Button>Secondary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="danger">Delete</Button>
Solid system blue — main call to action.
Default glass button — .btn with no modifier.
Low emphasis — tertiary actions and dismiss.
Destructive actions that need clear warning.
Tighter padding for dense toolbars and chips rows.
Add .btn-with-icon and a mask icon span.
.is-busy + spinner; disable interaction while pending.
Native disabled — reduced opacity, no press.
<button type="button"> (or submit) — not a styled link — for actions.aria-label.
aria-busy="true" and keep the control disabled so it is not
activated twice.
aria-hidden="true"; the spinner is decorative too.| Class | Description |
|---|---|
.btn |
Base glass button (secondary). |
.btn-primary |
Solid primary action. |
.btn-ghost |
Transparent / low-emphasis. |
.btn-danger |
Destructive action. |
.btn-compact |
Smaller padding and type. |
.btn-with-icon |
Layout for leading icon or spinner. |
.btn-icon |
Size the leading mask icon. |
.btn-spinner |
Busy indicator (pair with .is-busy). |
.is-busy |
Busy pulse state. |
.actions |
Horizontal group of buttons with gap. |
From src/core/Button.tsx — extends native
ButtonHTMLAttributes<HTMLButtonElement>.
| Prop | Type | Default | Description |
|---|---|---|---|
variant |
'primary' | 'secondary' | 'ghost' | 'danger' |
'secondary' |
Visual variant → CSS modifier class. |
compact |
boolean |
false |
Applies .btn-compact. |
busy |
boolean |
false |
Shows spinner, sets aria-busy, disables the control.
|
icon |
IconName |
— | Leading icon from the Caustica Design icon set (hidden while busy). |
children |
ReactNode |
— | Button label / content. |
type |
'button' | 'submit' | 'reset' |
'button' |
Native button type. |
className |
string |
— | Merged via cx onto the root. |
disabled |
boolean |
— | Also forced when busy is true. |