shadcn.io is not affiliated with official shadcn/ui
Input Group examples · Spinner
Loading States Input Group for React
Two disabled inputs, one with a spinner at its end and one at its start.
Framework
UI library
Show work in progress inside the field it affects. Both inputs are disabled while busy; the first shows a Spinner at its end, the second at its start. Pick the side by where people look: the end for search, the start for a status.
Preview
Installation
Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
FAQ
How do I put the spinner at the start or the end?
With align on its InputGroupAddon: inline-end for the first field, the default inline-start for the second. Both addons come after the input.
How are the fields disabled?
disabled on each InputGroupInput. data-disabled="true" on InputGroup dims the addons.
How do I show the spinner only while loading?
Render the addon only while your request is pending, and drop disabled when it settles.
Related
- Spinner with Text Input GroupA disabled input with Saving
- Animated Icon Spinner Input GroupA disabled input with a spinning loader
- Textarea Loading Input GroupA disabled textarea with a spinner under
- Button with Text (Standard)The one filled action
- Input with LabelA text input with a label above it
- Simple Text Input FormA form with one username text input that