Spinner
Small loading indicator for async actions and deferred regions.
All components · Theme builder · Implementation source
Live preview
Install
netscript ui:add spinnerUsage and examples
The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.
import { useState } from 'preact/hooks';
import { Spinner } from '@app/components/ui/spinner.tsx';
export function Example() {
const [value, setValue] = useState('standard');
const [open, setOpen] = useState(false);
const [notice, report] = useState('');
return (<><div><Spinner label="Loading orders" /></div><p role="status">{notice}</p></>);
}Props
Generated from native deno doc --json --private over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.
| Owner | Prop | Type | Optional | Description |
|---|---|---|---|---|
SpinnerProps | class | string | Yes | |
SpinnerProps | label | string | Yes | |
SpinnerProps | size | SpinnerSize | Yes |
type SpinnerSize = "sm" | "md" | "lg"
SpinnerProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, "class" | "children">Keyboard
Presentation component; no component-specific keyboard interactions.
Tokens
Semantic contract roles: border/subtle, primary/default.
CSS custom properties referenced directly: --ns-marker, --ns-primary, --ns-radius-full.
Contract and compatibility
Accessibility pattern: status
- Native DOM attributes pass through where the implementation accepts them.
Design contract values marked planned are not implementation props. The props above describe what ships today.