Skip to content

IconButton

stable

Icon-only action button with accessible label

ActionsInteractive/Storybook ↗
import { IconButton } from "@nodus/design-system"
Loading demo…

Props

iconrequired
Type ReactNodeDefault

Icon content to render

labelrequired
Type stringDefault

Accessible label for the button

size
Type "sm" | "md" | "lg"Default "md"

Icon button size

variant
Type "primary" | "secondary" | "ghost" | "danger"Default "ghost"

Visual style variant

Accessibility

  • The required label prop is applied as aria-label on the button — icon-only buttons are accessible by default.
  • Touch target meets 44×44px minimum at all sizes (sm=32px padded, md=40px, lg=48px).
  • Rendered as a native <button> — keyboard focusable and operable via Enter/Space.
Metadatasmmdlgsemantictypebordermotion
MobileTouch Target

Icon-only buttons are high-risk on mobile. Apply min-h-[44px] min-w-[44px] via padding or use size='lg'. Never place icon-buttons in tight rows without sufficient spacing.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?