Shows that something short is in progress.
import { Spinner } from "@usememos/ui";
<Spinner label="Loading notes" />interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
size?: Size; // 12, 14, 16px; default: the surrounding Root's size, else md
label?: string; // for screen readers, default "Loading"
render?: React.ReactElement;
}Renders a <span role="status"> named by label.
- For a wait inside a control, use the control's
loadingprop. - For content that is loading, use Skeleton, so the layout doesn't jump.
- Don't show a spinner for waits under about 300ms.
- A ring in
currentColorwith one gap, at the icon stroke width of its size, turning once everyduration-spin.