A spinning circular loading indicator. Renders a single <span>.
Use Loader for an indeterminate busy state where you only need a standalone spinner (page/section loading, inline "please wait"). For the busy state of a button, use Button's isLoading prop instead of placing a Loader inside it.
There is no @uxf/form twin.
import { Loader } from "@uxf/ui/loader";
<Loader />
<Loader size="sm" />
<Loader size="lg" />
LoaderProps extends HTMLAttributes<HTMLDivElement>, but only className and the forwarded ref are applied to the rendered element — other HTML attributes from the type are not currently forwarded.
| Prop | Type | Default | Description |
|---|---|---|---|
size |
"sm" | "default" | "lg" |
"default" |
Spinner size. |
className |
string |
— | Merged onto the root <span>. |
size |
Diameter |
|---|---|
sm |
24px |
default |
48px |
lg |
96px |
The spinner color follows the current text color (currentColor); it turns white in dark mode.
Import the component stylesheet once in your global CSS:
@import url("@uxf/ui/css/loader.css");
Also requires the global @uxf/ui token layer, set up once per app — see @uxf/ui setup.