Links and buttons

Links, buttons, link buttons, groups, and toggles.

Buttons

Buttons are solid primary. type="reset" and formnovalidate buttons are secondary outlines.

Accessibility

aria-busy="true" shows a spinner that pulses instead of spinning when motion is reduced. Disabled buttons can't be focused, so explain why an action is unavailable somewhere else.

Customize

The text on a primary button picks black or white for contrast, or --m-on-primary if you set it.

Groups and toggles

role="group" joins its children into one control. Buttons with aria-pressed are toggles, so a group of them is a segmented control.

Accessibility

Label the group with aria-label. Screen readers announce each toggle as pressed or not. This demo moves the pressed state with a small script.

Customize

The pressed state uses a tint of --m-primary and a thicker border.