Introducing Aceternity UI Pro - 70+ premium component packs and templates to build amazing websites.
Logo

Stateful Button

A button that shows a loading state when clicked, and a success state when the action is completed.

Open in

Installation

Run the following command

npx shadcn@latest add https://ui.aceternity.com/registry/stateful-button.json

Props

PropTypeDefaultDescription
classNamestringundefinedAdditional CSS classes to apply to the button. Will be merged with default styling.
childrenReact.ReactNode-The content to display inside the button (text, icons, etc.)
onClick(event: React.MouseEvent<HTMLButtonElement>) => void | Promise<void>undefinedClick handler that triggers the loading → success animation sequence. Can be async.
disabledbooleanfalseWhether the button is disabled
type"button" | "submit" | "reset""button"The button type attribute
...buttonPropsReact.ButtonHTMLAttributes<HTMLButtonElement>-All other standard HTML button attributes are supported

Inspired by the design of buttons on Family

Build websites faster and 10x better than your competitors with Aceternity UI Pro

With the best in class components and templates, stand out from the crowd and get more attention to your website. Trusted by founders and entrepreneurs from all over the world.

Go Pro
Manu is the man! He is the best front-end developer I have worked with. He took the requirements and quite literally ran with them. We are super happy with the result and product we go...

John Shahawy

Founder at Rogue and Moonbeam

A product by Aceternity
Building in public at @mannupaaji