Skip to content
nexubDesign System
v12.7.0

Components · Actions

Icon Button

StableAdded v0.0.1

A square button designed to hold a single icon, with an accessible label.

import { IconButton } from '@nexub/react';
View as Markdown

Playground

Props

variant
TSX
<IconButton label="Add item">…</IconButton>

Examples

Default

Variants

States

  • default
  • disabled
  • loading
  • size="sm"
  • size="md"
  • size="xs"
  • size="lg"
  • size="xl"
  • variant="solid"
  • variant="subtle"
  • variant="ghost"
  • variant="outline"

Props

Props
PropTypeDefaultDescription
variant'solid' | 'subtle' | 'ghost' | 'outline''ghost'Visual style of the icon button.
size'sm' | 'md' | 'xs' | 'lg' | 'xl''md'Controls button dimensions.
disabledboolean—Disables the button.
loadingboolean—Shows a spinner and disables interaction.
asChildbooleanfalseMerges props onto the immediate child element (Radix Slot).
labelrequiredstring—
tooltipReact.ReactNode—Built-in tooltip: content, or true to show label. No Provider needed.