Skip to main content

Spinner

A loading indicator driven by the aria-busy="true" attribute. No extra markup โ€” the spinner is injected via CSS on any element that has aria-busy. Accessible by default: screen readers announce "loading" automatically.

Preview ยท Spinner

Codeโ€‹

<!-- Inline spinner (element becomes the spinner) -->
<div aria-busy="true"></div>

<!-- Sizes -->
<div aria-busy="true" data-spinner="small"></div> <!-- 1rem -->
<div aria-busy="true" data-spinner="large"></div> <!-- 3rem -->
<div aria-busy="true" data-spinner="xlarge"></div> <!-- 4rem -->

<!-- Overlay mode โ€” dims and disables children while loading -->
<div aria-busy="true" data-spinner="overlay large">
<table><!-- content is dimmed while aria-busy="true" --></table>
</div>

<!-- Button with spinner -->
<button disabled>
<div aria-busy="true" data-spinner="small" style="width:1rem;height:1rem"></div>
Saving...
</button>

Propsโ€‹

AttributeValueDescription
aria-busy"true"Activates the spinner. Remove or set to "false" to hide.
data-spinner"small" | "large" | "xlarge" | "overlay"Size and mode. Combine: "overlay large".
Version history

See the Changelog for version history and breaking changes.