shadcn.io is an independent project built on shadcn/ui
Two ways to build a URL from a menu plus typed text. The first field starts with an https:// menu that also offers http://. The second ends with a .com menu that also offers .net, .org, and .io. The button labels stay https:// and .com.
Use it when part of the URL is a choice and part is typed. A fully free address is an Input. In Solid, Ark UI does not swap the button label to the item someone picked.
Installation
Anatomy

Usage
<div class="flex w-full max-w-sm flex-col gap-4">
<InputGroup class="bg-background">
<InputGroupInput aria-label="Domain" placeholder="example.com" type="text" />
<InputGroupAddon>
<DropdownMenu positioning={{
placement: "bottom-start"
}}>
<DropdownMenuTrigger asChild={props => <InputGroupButton {...props({
"class": "text-xs"
})} variant="ghost">
https://
<ChevronDownIcon aria-hidden="true" class="size-3" />
</InputGroupButton>} />
<DropdownMenuContent>
<DropdownMenuGroup>
<DropdownMenuItem value="https">https://</DropdownMenuItem>
<DropdownMenuItem value="http">http://</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
</InputGroupAddon>
</InputGroup>
<InputGroup class="bg-background">
<InputGroupInput aria-label="Subdomain" placeholder="subdomain" type="text" />
<InputGroupAddon align="inline-end">
<DropdownMenu positioning={{
placement: "bottom-end"
}}>
<DropdownMenuTrigger asChild={props => <InputGroupButton {...props({
"class": "text-xs"
})} variant="ghost">
{/* The rest of the file is under Installation. */}FAQ
How does the protocol menu sit before the input?
Its InputGroupAddon keeps the default align, inline-start, which places it before the input. In the code it still comes after the input, as every addon does.
How are the menu buttons built?
Each trigger is a ghost InputGroupButton with text-xs, the current value and a small chevron. DropdownMenuTrigger takes asChild as a function that renders the InputGroupButton.
Where do the menus open?
Each opens under its button, aligned to the edge it sits on: start for the protocol, end for the domain.
API Reference
Input Group
Sets aria-label="Domain", placeholder="example.com", type="text", props, text-xs and variant="ghost". The rest is on the Input Group page.
Dropdown Menu
Sets positioning, placement, bottom-start, asChild, props and value="https". The rest is on the Dropdown Menu page.





