Spinner

An indicator that can be used to show a loading state.

buridan add spinner

Component Guide

Use the following to build the Spinner component.

from components.ui.spinner import spinner

Source Code & Dependencies

For manual installation, copy each of the source codes below in their respective locations.

components/core/core.py

components/ui/spinner.py

Examples

Size

Use a size-* utility class to change the spinner's size.

Props used: class_name on spinner.

Button

Add a spinner to a button for a loading state. Add data-icon="inline-start" to position it before the label.

Props used: data_icon on spinner.

Badge

Add a spinner to a badge for a loading/syncing state.

Props used: data_icon on spinner.

SyncingUpdatingProcessing

Marker

Combine spinner with marker and the shimmer utility for animated streaming status indicators. Set role="status" so assistive technology announces updates.

Props used: role on spinner.

Thinking…
Generating response…
Processing

API Reference

spinner

spinner(class_name="size-5")
Prop Type Default Description
class_name str "" Additional classes applied to the icon (e.g. size-* to resize).

Any other prop accepted by a native <svg> (role, aria_label, data_icon, etc.) is also passed straight through. role="status" is set by default.