1 slot open this monthBy the makers of shadcnregistryWe built shadcnregistry. Now we build your product.Book a callCheck availability
1 slot open this monthAI features?We build AI features into your product.Book a callCheck availability
1 slot open this month๐Ÿšจ Slop police๐Ÿšจ Slop police: we clean up vibe-coded apps.Report itReport your app
shadcnregistry
shadcnregistry
RegistryHealthInspect
Terms of ServicePrivacy Policy
  1. Registries
  2. sunui
  3. Loading Button

Loading Button

block

A submit button that handles its own async state: return a Promise from onClick and it goes loading, then success with a drawn check or error with a retry label, and resets after a delay. Shrink style collapses into a round spinner, inline style keeps the width. Also accepts a controlled state, announces each state politely and ignores presses while busy.

pnpm dlx shadcn@latest add "https://sunui.synvize.com/r/loading-button.json"
Premium blocks for shadcn/uiShadcnblocks.com ยท AffiliateExplore
  • framer-motion
  • utils
components/loading-button.tsx