File: spinner.md | Updated: 11/15/2025
ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors
Getting started Styling Layout Releases Resources
Overview Color Dark mode Typography Spacing Breakpoints Radius Shadows Cursors
Box Flex Grid Container Section
Text Heading Blockquote Code Em Kbd Link Quote Strong
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
Accessible Icon Portal Reset Slot Theme Visually Hidden
Components
Displays an animated loading indicator.
View source Report an issue View in Playground
<Spinner />
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 |
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>
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>
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