Loading Button

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.

LoadingButton props

PropTypeDefaultDescription
childrenReactNodeLabel shown while idle.
loadingLabelReactNode"Saving"Label shown while loading.
successLabelReactNode"Saved"Label shown after success.
errorLabelReactNode"Failed"Label shown after an error.
statusLoadingStatusControlled 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.
resetAfternumber1800Milliseconds before success or error returns to idle.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks