shadcn.io is not affiliated with official shadcn/ui
Spinner examples · Applications
Spinner in Input Group for React
A disabled input and textarea with a spinner in their addons while a message is validated.
While a message is checked or sent, the field should say so. In these two Input Group fields, a Spinner sits in the input's end addon, and in the textarea's bottom addon next to Validating... and a send button. Both fields are disabled meanwhile.
Preview
Installation
FAQ
Why are the field and the textarea disabled?
Both set disabled, and both have aria-label Message. The one-line field is an InputGroupInput with type text. The other is an InputGroupTextarea. The placeholder on each is "Send a message...".
Where is the spinner on the one-line field?
In an InputGroupAddon with align set to inline-end, after the input. The addon's only child is a Spinner at the default size.
What is in the textarea's addon?
An InputGroupAddon with align set to block-end. Inside it: a Spinner, the text "Validating...", and an InputGroupButton. className ms-auto on that button pushes it to the end of the row.
What is the send button?
An InputGroupButton with aria-label Send, size icon-xs, and variant default. The icon is ArrowUpIcon with aria-hidden. The button has no click handler in this file.
Related
- Loading Button SpinnerA disabled button with a spinner before
- Inline with Text SpinnerA spinner beside a Loading data
- Simple AI Prompt Input GroupAn AI prompt box with an enhance button
- Copy Button Input GroupA read-only link with a copy button that
- Spinner in ItemA download row with a spinner, the size
- Input with LabelA text input with a label above it