Skip to content

Button Library · Basic

Icon

Icon only, with a label for screen readers.

Keep aria-label: it is the only name a screen reader gets.

States

  • Default

  • Hover

  • Active

  • Focus

Code

icon.html

<button class="btn-icon" type="button" aria-label="Like">
  <svg class="btn-icon__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
    <path d="M12 20s-7-4.6-8.6-9A4.6 4.6 0 0 1 12 7.5 4.6 4.6 0 0 1 20.6 11C19 15.4 12 20 12 20Z"></path>
  </svg>
</button>

More in Basic