For AI agents: the complete documentation index is at llms.txt. Markdown versions are available by appending .md or sending Accept: text/markdown.
Reflex Logo
Docs Logo
Library

/

Data Display

/

Spinner

Spinner

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

Basic Examples

Spinner can have different sizes.

Demo with buttons

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

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.

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.

Built with Reflex