shadcn.io is not affiliated with official shadcn/ui
Input Group examples · Icons
Multiple Icons Input Group for React
A password and an API key input with two icons at their end, and a key icon at the start of the second.
Framework
UI library
Several cues on one field. Two inline-end addons line up after the password input, an eye and a refresh icon; the API key field adds a key icon at its start. The icons are decorative; use buttons when they should do something.
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 two icons sit at the end?
Two InputGroupAddons with align="inline-end", in source order after the input.
How does the key icon sit at the start of the second field?
Its addon keeps the default inline-start, which places it before the input.
Can the eye show the password?
Not as an icon. Make it an InputGroupButton that switches the type, as in Password Actions.
Related
- Dual Icons Input GroupA card number and a password input, each
- Search with Icon Input GroupA search input with a magnifying glass at
- Password with Toggle InputA password field with a button that shows
- Dropdown Actions Input GroupA file name input with a more-actions
- Copy Button Input GroupA read-only link with a copy button that
- Input with LabelA text input with a label above it