API reference: @salmonui/notifications/spinner
Spinnercomponent
import { Spinner } from '@salmonui/notifications/spinner';function Spinner({ label, size, loading, overlay, indicator, children, className, style, ref, ...rest }: SpinnerProps): import("react").JSX.Element | null;
A loading indicator. <Spinner label="Loading orders" /> announces its
label; <Spinner loading={pending}>{content}</Spinner> covers content while
loading is true.
Props: SpinnerProps
| Name | Signature | Description |
|---|---|---|
labeloptional | label?: string; | Accessible loading text. With a label the spinner is a
|
sizeoptional | size?: SpinnerSize | number; |
|
loadingoptional | loading?: boolean; | Shows the indicator (default |
overlayoptional | overlay?: boolean; | Covers the nearest positioned ancestor with a scrim and centers the indicator. |
indicatoroptional | indicator?: ReactNode; | Replaces the built-in ring. |
childrenoptional | children?: ReactNode; | Content the spinner covers while |
refoptional | ref?: Ref<HTMLElement>; | The root element: the spinner |