FeedbackNew
Glass Spinner
A small spinning ring that tells screen readers something is loading.
Preview
Loading smallLoadingLoading large
Demos ready. Update 0.
The preview runs the React version. On iOS 26 and later, the React Native version uses the system’s own glass. See it on a phone.
Installation
For React 19+ apps with Tailwind CSS 4.
npx shadcn@4.14.1 add @glassyui/glass-spinnerAdds 5 files to components/glassyui and installs clsx.
Usage
Usage
import { GlassSpinner } from "@/components/glassyui/glass-spinner";
export function SavingDemo() {
return <GlassSpinner label="Saving" />;
}React Native usage
import { GlassSpinner } from '@/components/glassyui/glass-spinner';
export default function SpinnerExample() {
return <GlassSpinner label="Loading messages" size="lg" />;
}
Examples
Inside a button
<GlassButton disabled>
<GlassSpinner size="sm" label="Saving" />
Saving…
</GlassButton>API reference
GlassSpinner
A span with role status; the ring is drawn in the theme's foreground colour, so set color to change it.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | 'Loading' | Visually hidden text that screen readers announce. |
size | 'sm' | 'md' | 'lg' | 'md' | Diameter: 1rem, 1.5rem or 2.25rem. |
role | string | 'status' | Live-region role; override it when the spinner sits inside another live region. |
Also accepts HTML span attributes, except children.
- Types
GlassSpinnerPropsGlassSpinnerSize
The React Native props and exports are in the component’s source.