Skip to main content
Spinner
@coinbase/cds-web@8.38.5
A loading indicator that displays a rotating animation to communicate that content is loading or a background process is in progress.
import { Spinner } from '@coinbase/cds-web/loaders/Spinner'

Basics

The size prop is required and controls the spinner dimensions. The value is in pixels and determines the font size from which the width (10em), height (10em), and border width (1.1em) are calculated.

Loading...

Buttons

Use loading on Button and IconButton to show a spinner during async operations. The button becomes non-interactive while preserving its dimensions.

Loading...

Styling

Color

Use the color prop to customize the spinner's color. The default is fgMuted. Any valid CDS design token color can be used.

Loading...

On Colored Backgrounds

When placing a spinner on a colored background, choose a color with sufficient contrast.

Loading...

Sizing

Use different sizes to match the context - smaller spinners work well inline or within buttons, while larger spinners are appropriate for page or section loading states.

Loading...

Accessibility

Use accessibilityLabel to provide context for screen readers. The spinner uses role="status" and aria-live="polite" to announce the loading state.

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.