Loading Button from the Buttons group of Depth UI.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | Label shown while idle. | |
| loadingLabel | ReactNode | "Saving" | Label shown while loading. |
| successLabel | ReactNode | "Saved" | Label shown after success. |
| errorLabel | ReactNode | "Failed" | Label shown after an error. |
| status | LoadingStatus | Controlled status. Leave it out to let a returned Promise drive it. | |
| onClick | (e: MouseEvent<HTMLButtonElement>) => void | Promise<unknown> | Called on click. If it returns a Promise, the button tracks it as loading, success or error. | |
| resetAfter | number | 1800 | Milliseconds before success or error returns to idle. |