shadcn.io is an independent project built on shadcn/ui
A filled button is disabled. A spinner sits before the label Loading.... The spinner is hidden from assistive tech, so the button name is the label. No request runs.
Use it after a click so the action cannot be pressed twice. Change the label to Saving... or Sending... when that is the action. A percent on the work fits Progress. In Solid, Ark UI does not disable the button for you. This file does.
Installation
Anatomy

Usage
<Button disabled>
<Spinner aria-hidden="true" data-icon="inline-start" />
Loading...
</Button>FAQ
Why is the button disabled?
disabled is set on the Button, so it can't be pressed again while its label reads Loading... It draws at reduced opacity.
How does the spinner line up with Loading...?
The Spinner is the first child, with data-icon set to inline-start. That uses the button's own icon spacing, so the wheel sits in front of the label.
Can the label say what is happening?
Yes. This file uses the text "Loading...". Swap that string for "Saving..." or "Sending..." and leave the Spinner where it is.
Which button variant is this?
None is set, so it is the default filled button at the default size. Pass variant or size on the same Button to change the look. Keep it disabled, with the Spinner.
API Reference
Button
Sets disabled. The rest is on the Button page.
Spinner
Sets aria-hidden and data-icon="inline-start". The rest is on the Spinner page.




