Spinner
Native Solid 2 fork. Original documentation and designs © WorkOS; historical posts retain their original context.
API Reference
This component is based on the span element and supports common margin props.
Examples
Size
Use the size prop to control the size of the spinner.
With children
Use the loading prop to control whether the spinner or its children are displayed. Spinner preserves the dimensions of children when they are hidden and disables interactive elements.
With buttons
Buttons have their own loading prop that automatically composes a spinner.
If you have an icon inside the button, you can use the button’s disabled state and wrap the icon in a standalone <Spinner> to achieve a more sophisticated design.