For AI agents: the complete documentation index is at llms.txt. Remove the trailing slash from a page URL and append .md to read its Markdown version. For the docs home, use index.md.

Spinner

Spinner is used to display an animated loading indicator when a task is in progress.

Start Building Now!

Basic Examples

Spinner can have different sizes.

Start Building Now!

Demo with buttons

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

Start Building Now!

Spinner inside a button

If you have an icon inside the button, you can use the button's disabled state and wrap the icon in a standalone rx.spinner to achieve a more sophisticated design.

Start Building Now!

API Reference

rx.spinner

A spinner component.

rx.spinner(
loading=True,
size="1",
)
loading
size

Props

PropTypeDescription
loading
bool

If set, show an rx.spinner instead of the component children.

size
"1""2""3"

The size of the spinner.