Button
Buttons let people take an action or make a choice.
| Name | Type | What it does |
|---|---|---|
btn | component | A button. Works on <button>, <a> and <input type=submit> |
btn-outline | modifier | Transparent with a coloured border |
btn-ghost | modifier | No border or fill until hovered |
btn-sm | size | Small |
btn-lg | size | Large |
btn-circle | modifier | A round, square-proportioned button for a single icon |
btn-block | modifier | Full width |
disabled | state | HTML attribute (or aria-disabled="true" on links) |
aria-busy="true" | state | Shows a spinner and blocks clicks |
btn-primary | colour | Tints it with the primary colour |
btn-secondary | colour | Tints it with the secondary colour |
btn-success | colour | Tints it with the success colour |
btn-warning | colour | Tints it with the warning colour |
btn-danger | colour | Tints it with the danger colour |
Colours
<button class="btn">Default</button>
<button class="btn btn-primary">Primary</button>
<button class="btn btn-secondary">Secondary</button>
<button class="btn btn-success">Success</button>
<button class="btn btn-warning">Warning</button>
<button class="btn btn-danger">Danger</button>Outline and ghost
<button class="btn btn-outline">Outline</button>
<button class="btn btn-outline btn-primary">Outline primary</button>
<button class="btn btn-ghost">Ghost</button>
<button class="btn btn-ghost btn-secondary">Ghost secondary</button>Sizes and shapes
<button class="btn btn-sm">Small</button>
<button class="btn">Medium</button>
<button class="btn btn-lg">Large</button>
<button class="btn btn-circle" aria-label="Notifications"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 9a6 6 0 1 1 12 0c0 6 2 7 2 7H4s2-1 2-7zm4 11a2 2 0 0 0 4 0"/></svg></button>Disabled and busy
<button class="btn" disabled>Disabled</button>
<button class="btn btn-primary" aria-busy="true">Saving</button>