Spinner
A basic rotating figure indicating an in-progress state. The loading mask (Loading service) renders it internally as well.
Basic usage
Basic usage
Loading
import { LhSpinner } from '@lh-ui/react'
export default function Demo() {
return (
<>
<LhSpinner size="small" />
<LhSpinner size="medium" />
<LhSpinner size="large" />
<LhSpinner color="#8f9779" />
</>
)
}
Spinner Props
| Prop | Description | Type | Options | Default |
|---|---|---|---|---|
| size | Size | 'mini' | 'small' | 'medium' | 'large' | 'x-large' | — | 'medium' |
| color | Rotation color (CSS color value; inherits currentColor when unset) | string | — | — |
| sx | Layout shorthand | SxProps | — | — |
Vue equivalent
size / color / sx match lh-ui-plus's LhSpinner props; the figure matches the plus
template as well (svg ring + stroke animation).
Accessibility
The figure is purely decorative and outputs aria-hidden="true", removing it from the
accessibility tree; the in-progress semantics belong to an outer container (e.g.
role="status"). The rotation respects prefers-reduced-motion, degrading to a static arc.
Styles
import '@lh-ui/react/style/spinner'