Icon button

Component

Icon button

The same press, for an icon alone.

Classes

ClassType
btn-squareComponentA square button. Pair it with btn-sm or btn-lg for the other sizes.
btn-smSizeSmall. Use it with btn-square.
btn-lgSizeLarge. Use it with btn-square.
primaryColorIndigo by default. Used when you set no color.
secondaryColorPink by default.
tertiaryColorTeal by default.
neutralColorGray by default.
successColorGreen by default.
errorColorRed by default.
warningColorAmber by default.
infoColorSky by default.
loadingStateAn orbit of lights, because the face is square.

Colors

Give it an accessible name. Leave the svg without a size class. The button sets the icon size.

<button class="btn-square primary" type="button" aria-label="Add">
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
    <path d="M12 5v14M5 12h14" />
  </svg>
</button>

Sizes

<button class="btn-square btn-sm" type="button" aria-label="Add small"></button>
<button class="btn-square" type="button" aria-label="Add"></button>
<button class="btn-square btn-lg" type="button" aria-label="Add large"></button>