Buttons
Actions in three colour families — Primary, Secondary, and Danger. Secondary is the outline-style supporting action. Danger ships with both Filled and Outlined sub-variants.
Canonical
The most-used shape. Use Primary once per view for the page's reason for being — submit, accept, create, send.
Variants
4 variantsStates
4 statesProps
2 attributes| Attribute | Values | Notes |
|---|---|---|
| koala-btn | Primary, Secondary, Danger | Required. Selects the colour family. |
| koala-btn-variant | Filled, Outlined | Defaults to Filled. Only meaningful with Danger. |
| disabled | — | Standard HTML attribute. Drops opacity and blocks events. |
| asp-page / href | Razor route or URL | Emits as <a> instead of <button>. |
Do & don't
Icon labels
Buttons may include a leading icon. The helper keeps the icon and label on one line; surrounding layouts wrap the whole button when space is tight.
Loading state
Applied to a button to wire an Alpine loading state. On click,
the helper swaps the label for a spinner, disables the button, and dims every other button / link
inside the same form so the user can't fire two submissions.
Click the button to see the spinner. State resets on the next page render.