shadcn.io is not affiliated with official shadcn/ui
Input Group examples · Text
Email with Domain Input Group for React
A username input with a fixed @vercel.com domain at its end.
Framework
UI library
For sign-ups limited to one domain: people type the part before the @, and @vercel.com is shown after it as InputGroupText. Combine the two when you submit.
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 does the domain sit after the input?
An InputGroupAddon with align="inline-end", written after the input.
Is the domain part of the value?
No, the input holds only the username. Append @vercel.com when you submit or validate.
Why type=text and not type=email?
The field holds only the part before the @, which isn't a full address.
How is the field labeled?
aria-label="Email username". Add the domain to the label or a description if people should hear it.
Related
- Currency Input Input GroupDollar and euro amount inputs with the
- URL Builder Input GroupA domain input between a fixed https://
- Inline Labels Input GroupA username input after an @ label and a
- Email InputAn email field with a mail icon inside it
- Simple Text Input FormA form with one username text input that
- Input with LabelA text input with a label above it