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 Svelte, 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>{#snippet asChild(props)}<InputGroupButton {...props({ class: "text-xs" })} variant="ghost">https://<ChevronDownIcon aria-hidden="true" class="size-3" /></InputGroupButton>{/snippet}</DropdownMenuTrigger><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>{#snippet asChild(props)}<InputGroupButton {...props({ class: "text-xs" })} variant="ghost">.com<ChevronDownIcon aria-hidden="true" class="size-3" /></InputGroupButton>{/snippet}</DropdownMenuTrigger><DropdownMenuContent><DropdownMenuGroup><DropdownMenuItem value="com">.com</DropdownMenuItem><DropdownMenuItem value="net">.net</DropdownMenuItem><DropdownMenuItem value="org">.org</DropdownMenuItem><DropdownMenuItem value="io">.io</DropdownMenuItem></DropdownMenuGroup></DropdownMenuContent></DropdownMenu></InputGroupAddon></InputGroup></div>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 an asChild snippet 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, value="https", value="http" and bottom-end. The rest is on the Dropdown Menu page.





