shadcn.io is not affiliated with official shadcn/ui
Spinner examples · Applications
Spinner in Item for React
A download row with a spinner, the size transferred, a Cancel button and a progress bar.
A download row that shows it's working and how far along it is. The Item has a Spinner as its media, Downloading... and 129 MB / 1000 MB as its text, a Cancel button, and a Progress bar at 75 in its footer.
Preview
Installation
FAQ
Where is the spinner in the download row?
In ItemMedia with variant set to icon. The Item uses variant outline. The spinner is the default size, with role="status" and an aria-label of Loading.
What do the title and description say?
ItemTitle is "Downloading...". ItemDescription is "129 MB / 1000 MB". Both sit in ItemContent, next to the media.
How is the progress bar set?
Progress is in ItemFooter, with value 75, className w-full, and aria-label "Download progress". The bar shows that value. The spinner is separate, in the media slot.
When does the Cancel button show?
ItemActions has className hidden sm:flex, so the button is hidden on the smallest width and shown from the sm breakpoint. The Button is size sm and variant outline, labeled Cancel.
Related
- Spinner in Input GroupA disabled input and textarea with a
- Inline with Text SpinnerA spinner beside a Loading data
- Loading Button SpinnerA disabled button with a spinner before
- Basic ItemAn outline item with a title, a one-line
- Spinner in Empty StateA full-area loading state with a spinner
- Loading Icon Button SpinnerA disabled icon-only button that shows