Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting StartedFrameworksServer RenderingDesign TokensThemingTheme SynthesizerTypographyUtilitiesAll ComponentsAccessibilityBrowser SupportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Icon Button

Compact button that renders an icon with optional text label, supporting ghost, secondary, and primary variants.

ComponentsIcon Button
inputhybrid
<arc-icon-button>

Overview

IconButton is a versatile interactive element designed for actions where an icon is the primary affordance. It renders as a square button when used icon-only, or expands into a compact labeled button when the `text` prop is provided. Use it in toolbars, action bars, card headers, and anywhere space is limited but functionality needs to be discoverable. The component supports three visual variants: `ghost` (transparent background, the default), `secondary` (bordered with accent glow on hover), and `primary` (solid accent-primary background with a glow effect). Four sizes are available (`xs`, `sm`, `md`, and `lg`), each with distinct dimensions for both icon-only and icon-plus-text modes. The icon-only mode enforces a 1:1 aspect ratio for visual consistency. When an `href` is provided, IconButton renders as an anchor tag instead of a `<button>`, making it suitable for navigation links that should look like action buttons. The `name` prop references an icon from the arc-icon library, but you can also pass custom SVG content through the default slot if the built-in icon set does not cover your use case.

Guidelines

When to use

  • Always provide a `label` or `text` prop so the button has an accessible name for screen readers
  • Use the `ghost` variant for secondary or tertiary actions in toolbars to reduce visual noise
  • Use `href` for navigation actions so the element renders as a semantic anchor tag
  • Match the `size` to surrounding elements. Use `xs` or `sm` in dense UIs like table rows
  • Pair with `arc-tooltip` to explain icon-only buttons on hover

When not to use

  • Do not use IconButton for primary page actions that need a full-width call to action. Use Button instead
  • Do not omit the `label` prop on icon-only buttons. They will be invisible to assistive technology
  • Do not combine `disabled` with `href`. Anchor tags cannot be natively disabled
  • Do not use long `text` values. The uppercase styling and compact padding are designed for 1-2 word labels
  • Avoid placing many `primary` variant icon buttons in the same row. Reserve the solid fill for the single most important action

Features

  • Three visual variants: ghost (default transparent), secondary (bordered with blue glow), and primary (solid accent fill)
  • Four sizes (xs 28px, sm 32px, md 36px, lg 44px) with automatic icon size mapping
  • Optional `text` prop that expands the button from a square icon into a labeled action button with uppercase styling
  • Renders as an `<a>` tag when `href` is provided, enabling accessible navigation links
  • Active-press animation with `scale(0.93)` transform for tactile feedback
  • Built-in `arc-icon` integration via the `name` prop, or custom content via the default slot
  • Focus-visible glow ring using the shared `--focus-glow` token for keyboard navigation
  • Accessible `aria-label` derived automatically from `label`, `text`, or manual override

Preview

Usage

Layout and styling work without JavaScript via the HTML/CSS versions. Interactive features like events and state management require the Web Component or a framework wrapper.

<script type="module" src="@arclux/arc-ui"></script>

<!-- Toolbar with mixed variants -->
<div style="display:flex; gap:8px; align-items:center;">
  <arc-icon-button name="pencil" label="Edit" variant="ghost"></arc-icon-button>
  <arc-icon-button name="copy" label="Duplicate" variant="ghost"></arc-icon-button>
  <arc-icon-button name="trash" label="Delete" variant="ghost"></arc-icon-button>
  <arc-icon-button name="share" label="Share" variant="secondary"></arc-icon-button>
  <arc-icon-button name="plus" text="New Item" variant="primary"></arc-icon-button>
</div>

<!-- Sizes -->
<div style="display:flex; gap:8px; align-items:center; margin-top:16px;">
  <arc-icon-button name="star" label="Favorite" size="xs"></arc-icon-button>
  <arc-icon-button name="star" label="Favorite" size="sm"></arc-icon-button>
  <arc-icon-button name="star" label="Favorite" size="md"></arc-icon-button>
  <arc-icon-button name="star" label="Favorite" size="lg"></arc-icon-button>
</div>

<!-- Navigation link -->
<arc-icon-button name="gear" text="Settings" variant="secondary" href="/settings"></arc-icon-button>

API

namestring''
Name of the arc-icon to render. When empty, the default slot is used for custom icon content.
textstring''
Optional text label displayed next to the icon. When provided, the button expands from a square to a wider labeled button with uppercase styling.
labelstring''
Accessible label for the button. Falls back to text if not provided. Required for icon-only usage.
hrefstring''
When set, renders the button as an anchor tag for navigation links.
typestring'button'
HTML button type attribute. Only applies when href is not set.
variant'ghost' | 'secondary' | 'primary''ghost'
Visual style variant. Ghost is transparent, secondary has a border with glow, primary has a solid accent-primary fill.
size'xs' | 'sm' | 'md' | 'lg''md'
Button size controlling dimensions and icon scale. Icon-only sizes are circular: xs=28px, sm=32px, md=36px, lg=44px. The labeled form stays a rounded rectangle.
disabledbooleanfalse
Disables the button, reducing opacity to 40% and blocking pointer events.

See Also