Stateful Button for shadcn/ui: async feedback component with state machine architecture
Key features:
π Spinner and progress bar modes for different async operations
β‘ XState-powered state transitions between idle, loading, success, and error
βΏ Built-in ARIA support with customizable screen reader messages
π¦ Installs via shadcn CLI with full source code access
π¨ Works with all shadcn Button variants and sizes
π― Promise-based onClick handlers with automatic error handling
Perfect for form submissions, file uploads, and any async action needing user feedback. Ships as TypeScript source code so you can customize everything.
π Blog Post
π GitHub Repo
π Live Demo
Top comments (0)