Button styles are mixins, not classes — apply them to any
element. The same mixin works on <button> and <a>. Base element styles handle cursor, font, and focus — the
mixin handles appearance.
@use "mixins" as *;
// on a button element
.my-button {
@include button-primary;
}
// on a link element — identical mixin
.my-link {
@include button-primary;
}
// combine variants with sizes and shapes
.my-button {
@include button-ghost;
@include button-lg;
@include button-pill;
} Four semantic variants covering the full range of action hierarchy.
Primary
Main call to action. Use once per view.
@include button-primary;
Secondary
Supporting action. Lower visual weight than primary.
@include button-secondary;
Ghost
Minimal. Use on surfaces where a border is enough.
@include button-ghost;
Danger
Destructive actions. Confirm before executing.
@include button-danger;
All interactive states shown simultaneously for comparison.
Three sizes driven by box-button($size). Combine
with any variant.
@include button-sm; @include button-primary; @include button-lg; Shape modifiers compose with any variant.
@include button-primary; @include button-primary + button-pill; @include button-primary + button-icon;
The same mixin on different elements. Use <button> for actions, <a> for navigation. Never use <a>
without an href.
<button>
Native button element. Use for actions that do not navigate.
@include button-primary;
<a>
Link styled as button. Use for actions that navigate.
@include button-primary + :visited reset;
<button> for actions that do not
navigate
<a> with href for
navigation styled as a button
<a> without href <div> or <span> as buttons