📄 radixui/themes/docs/components/spinner

File: spinner.md | Updated: 11/15/2025

Source: https://www.radix-ui.com/themes/docs/components/spinner

Radix Homepage

Made by WorkOS

Radix Homepage

Made by WorkOS

ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors

Documentation Playground Blog

Overview

Getting started Styling Layout Releases Resources

Theme

Overview Color Dark mode Typography Spacing Breakpoints Radius Shadows Cursors

Layout

Box Flex Grid Container Section

Typography

Text Heading Blockquote Code Em Kbd Link Quote Strong

Components

Alert Dialog Aspect Ratio Avatar Badge Button Callout Card Checkbox Checkbox Group Checkbox Cards Context Menu Data List Dialog Dropdown Menu Hover Card Icon Button Inset Popover Progress Radio Radio Group Radio Cards Scroll Area Segmented Control Select Separator Skeleton Slider Spinner Switch Table Tabs Tab Nav Text Area Text Field Tooltip

Utilities

Accessible Icon Portal Reset Slot Theme Visually Hidden

Components

Spinner

Displays an animated loading indicator.

View source Report an issue View in Playground

<Spinner />

API Reference


This component is based on the span element and supports common margin props .

| Prop | Type | Default | | --- | --- | --- | | size | Responsive<"1" \| "2" \| "3"> | "2" | | loading<br><br>Prop description | boolean | true |

Examples


Size

Use the size prop to control the size of the spinner.

<Flex align="center" gap="4">
	<Spinner size="1" />
	<Spinner size="2" />
	<Spinner size="3" />
</Flex>

With children

Use the loading prop to control whether the spinner or its children are displayed. Spinner preserves the dimensions of children when they are hidden and disables interactive elements.

<Flex gap="4">
	<Spinner loading={true}>
		<Switch defaultChecked />
	</Spinner>

	<Spinner loading={false}>
		<Switch defaultChecked />
	</Spinner>
</Flex>

With buttons

Buttons have their own loading prop that automatically composes a spinner.

BookmarkBookmark

<Button loading>Bookmark</Button>

If you have an icon inside the button, you can use the button’s disabled state and wrap the icon in a standalone <Spinner> to achieve a more sophisticated design.

Bookmark

<Button disabled>
	<Spinner loading>
		<BookmarkIcon />
	</Spinner>
	Bookmark
</Button>

PreviousSlider

NextSwitch

Edit this page on GitHub.