Stateful Button

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

Installation

Run the following command

npx shadcn@latest add @aceternity/stateful-button

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

Next.js 15, Tailwind CSS v4 and Motion for react powered templates

200+ templates and blocks combined

Ready to copy paste component blocks, save days of development time

Aceternity UI Pro Demo - Light Mode

Access an ever-growing collection of premium, meticulously crafted templates and Component Blocks.

A product by Aceternity
Building in public at @mannupaaji

© 2026 Aceternity Labs LLC. All Rights Reserved.