Animated Generate Button
AI generate button: swaps to a spinner with a breathing glow while running; works controlled or uncontrolled.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
AnimatedGenerateButtonProps
Also accepts all props of React.ComponentProps<"button">
| Prop | Type | Default | Description |
|---|---|---|---|
| generating | boolean | — | Controlled generating state. Leave undefined to let the button simulate a run on click. |
| duration | number | 2500 | Simulated run length in milliseconds when uncontrolled |
| idleLabel | string | "Generate" | — |
| generatingLabel | string | "Generating…" | — |
Install
$ npx shadcn@latest add https://chromotion.dev/r/animated-generate-button.json