Spinner
An indicator that can be used to show a loading state.
Processing payment...$100.00
Installation
pnpm dlx cubix@latest add spinnerUsage
import { Spinner } from "@/components/cubix/spinner"<Spinner />Customization
You can replace the default spinner icon with any other icon by editing the Spinner component.
Size
Use the size-* utility class to change the size of the spinner.
Button
Add a spinner to a button to indicate a loading state. Place the <Spinner /> before the label with data-icon="inline-start" for a start position, or after the label with data-icon="inline-end" for an end position.
Badge
Add a spinner to a badge to indicate a loading state.
SyncingUpdatingProcessing
Input Group
Validating...
Empty
Processing your request
Please wait while we process your request. Do not refresh the page.
RTL
Wrap content in a container with dir="rtl" to mirror direction.
Processing payment...$100.00
API Reference
Spinner
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes. Use size-* utilities to change the spinner size. |
| aria-label | string | "Loading" | Accessible name announced by assistive technology. |