jatui

Button

Styled button with variants, sizes, loading + submit state machine

Variants

Sizes

Submit State Machine

Click a button to cycle through its states. All transitions use motion tokens.

→ success
→ error shake

Static States

Toggle (pressed)

Pass pressed to make an on/off toggle — it renders aria-pressed. Styling stays yours: choose variant from the same state. Omit it and no aria-pressed is rendered.

Native attributes

Any other attribute — aria-*, data-*, name, value, title — passes through to the rendered <button> (or <a>).

Current page link

Press Squish

All buttons compress to ~97% on press and spring back with --motion-spring (single overshoot).