Playground

Tone

Five color tones — same tone system as Button.

Priority

Primary is filled, secondary is soft.

Size

Three square sizes: small (32 × 32), medium (44 × 44, default), large (56 × 56). Icon scales with the button.

Inverse (on dark surface)

Pass inverse when placing on a dark or bold surface.

Loading

Spinner replaces the icon while loading. The button is non-interactive.

Disabled

Disabled state uses the shared disabled fill (same for every tone).

When to Use

Best for

  • Compact actions in toolbars, table rows, or card headers
  • Universal actions where the icon is well known (search, close, favourite)
  • Pairs of actions where space is tight — left and right arrows, plus and minus

Consider alternatives when

  • The action isn't obvious from the icon alone — use a labeled Button instead
  • You need a label for accessibility or context — aria-label helps screen readers but sighted users still need a clear icon

Props

PropTypeRequiredDescription
iconFC<SVGProps>YesThe SVGR icon component to render
aria-labelstringYesAccessibility label — REQUIRED because there is no visible label
tone"brand" | "neutral" | "info" | "warning" | "critical"NoColor tone (default: "brand")
priority"primary" | "secondary"NoVisual weight (default: "primary")
size"sm" | "md" | "lg"NoSize (default: "md")
inversebooleanNoUse on-dark token variants (default: false)
isLoadingbooleanNoShow spinner and disable interaction
isDisabledbooleanNoDisable the button
onClick(e) => voidNoClick handler
type"button" | "submit" | "reset"NoHTML button type (default: "button")

Import

import { IconButton } from '@/components/IconButton/eshop';

Design Tokens

IconButton uses the same token set as Button. The geometry differs (square, equal padding all sides):

SizePaddingRadiusIconSquare edge
smvar(--primitive-spacing-8)var(--primitive-radius-8)16 × 1632 × 32
mdvar(--primitive-spacing-12)var(--primitive-radius-12)20 × 2044 × 44
lgvar(--primitive-spacing-16)var(--primitive-radius-16)24 × 2456 × 56
Page tokens