Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

Loading States

Button group with individual loading states for async actions

Async operations require feedback—loading states communicate progress. This React component combines shadcn/ui's Button and ButtonGroup components for action buttons with per-button loading indication. Built on React useState tracking loading state per action, buttons show 'Copying...' text while disabled during async operations (simulated with setTimeout). Perfect for file operations in cloud storage showing upload/download progress, email clients with send/save draft actions, form submissions with multiple save options, or any interface with async grouped actions—individual loading states prevent button mashing, disabled state blocks conflicting operations, text change provides clear feedback. The pattern handles common async scenarios where multiple related actions might be triggered but only one should execute at a time.

Loading States preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.