shadcn.io is an independent project built on shadcn/ui
A Website label, a link icon inside the field, and the placeholder https://example.com. Under it, a line says to include https:// or http://.
Use it for a full address you will open later. A fixed https:// prefix, so people type only the domain, is an Input Group. In React, Base UI does not add the protocol for you.
Installation
Anatomy

Usage
<Field className="w-full max-w-sm">
<FieldLabel htmlFor="url-website">Website</FieldLabel>
<InputGroup className="bg-background">
<InputGroupInput
id="url-website"
placeholder="https://example.com"
type="url"
/>
<InputGroupAddon>
<LinkIcon aria-hidden="true" />
</InputGroupAddon>
</InputGroup>
<FieldDescription>Include https:// or http://</FieldDescription>
</Field>FAQ
What does type url give this field?
The browser checks that the value is an absolute URL, with its protocol, when the form is submitted, and mobile keyboards show keys like / and .com.
How is the icon placed inside the field?
The field is an InputGroup: InputGroupInput is the input and InputGroupAddon holds LinkIcon. The addon comes after the input in the markup and sits at the inline start, so it is on the left in left-to-right text and on the right in right-to-left text. Clicking it focuses the input.
Is the icon read by screen readers?
No. LinkIcon has aria-hidden, because the Website label already names the field. The icon is a visual hint only.
How is Website tied to the field?
Clicking the label focuses the field, and screen readers announce it with the field.
FieldLabel sets htmlFor to url-website, the input's id.
API Reference
Field
Sets htmlFor="url-website". The rest is on the Field page.
Input Group
Sets id="url-website", placeholder="https://example.com" and type="url". The rest is on the Input Group page.





