Make your AI a shadcn expert

Loading Button

Button with built-in loading spinner and state management for React.

Loading Button preview

Scroll to load preview

Finally, a loading button that just works. Pass loading= and it shows a spinner, disables itself, and swaps the text—all automatically. No more juggling disabled states and conditional icons. The spinner matches your text color and the transition is smooth. Perfect for form submissions, API calls, or any async action. When loading completes, it snaps back instantly. One prop, zero hassle.

Install with AI

If you've connected the shadcn.io MCP server to Claude Code, Cursor, Windsurf, or any MCP-ready AI editor, prompt your agent to install this button for you — no copy-paste, no CLI:

use shadcnio to install the loading-button button into my project

FAQ

Was this page helpful?

Sign in to leave feedback.