Skip to main content
IconButton
@coinbase/cds-web@8.34.1
A Button with an Icon for content.
Import
import { IconButton } from '@coinbase/cds-web/buttons/IconButton'
SourceView source codeStorybookView StorybookFigmaView Figma (internal only)
Related components
View as Markdown

IconButton is a compact button that displays only an icon. Use it for actions where the icon alone clearly communicates the purpose.

Basics

The only required props are name (which determines the icon) and accessibilityLabel (for screen readers).

Loading...

Variants

Use variants to denote intent and importance. The active prop fills the icon when enabled.

Loading...

Transparent

Use the transparent prop to remove the background until the user interacts with the button.

Loading...

States

Loading

Use the loading prop to show a spinner when an action is in progress. The button becomes non-interactive and displays a loading spinner instead of the icon.

Loading...

Disabled

Use the disabled prop to prevent interaction and show a disabled visual state.

Loading...

Sizing

IconButtons are compact by default. Use compact={false} for larger touch targets.

Loading...

Accessibility

Since icon buttons have no visible text, an accessibilityLabel is required to describe the button's purpose for screen readers.

<IconButton name="close" accessibilityLabel="Close trade modal" />

When composing a button with a visible label, use accessibilityLabelledBy to reference the label's id instead. See the Claim Drop example below.

Composed Examples

Claim Drop

A toggleable icon button with an adjacent label. Uses accessibilityLabelledBy to associate the button with its visible label.

Loading...

Notification Bell

An icon button with a badge showing the notification count. Uses DotCount to display the number of unread notifications.

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.