Icon Button

A button with an icon and a visually hidden label.

Examples

Variants

Sizes

Accessibility

  • Provide a clear label for the button that describes its action.
  • Avoid placing buttons very close to other interactive elements to prevent accidental activation. Important for e.g users with motor impairments.

API Reference

PropDefaultDescription
label-string

A visually hidden label read by screen readers.

as?-"button"
type?-"button" | "submit" | "reset"
icon-ElementType<IconProps>
size?-ResponsiveProp<"sm" | "md" | "xs">

Defines the size of the button

variant?-"primary" | "secondary" | "tertiary" | "ghost" | "white"

Sets the style variant of the button

isDisabled?-boolean

If true the button will be disabled