shadcn.io is an independent project built on shadcn/ui
A task prompt with a footer. A file button opens Attach File and Attach Image. GPT-4 is plain text at the end of the row, and a round send button follows it. None of those controls change the prompt.
Use it when people attach a file before they send. A drop zone of its own is File Upload. In React, Base UI does not store the chosen file.
Installation
Anatomy

Usage
<div className="flex w-full max-w-2xl flex-col gap-4">
<InputGroup className="bg-background">
<InputGroupTextarea
aria-label="Task"
placeholder="Describe your task..."
/>
<InputGroupAddon align="block-end">
<DropdownMenu>
<DropdownMenuTrigger
render={
<InputGroupButton
aria-label="Attach"
size="icon-xs"
variant="ghost"
/>
}
>
<FileIcon aria-hidden="true" />
</DropdownMenuTrigger>
<DropdownMenuContent align="start" side="top">
<DropdownMenuGroup>
<DropdownMenuItem>
<FileIcon aria-hidden="true" />
Attach File
</DropdownMenuItem>
<DropdownMenuItem>
<ImageIcon aria-hidden="true" />
Attach Image
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
{/* The rest of the file is under Installation. */}FAQ
How do I put the attachment menu and send button under the prompt?
Write one InputGroupAddon with align="block-end" after InputGroupTextarea. It holds the file menu, the GPT-4 text and the send button, and ms-auto on the text pushes it and the button to the end.
How is the Attach File and Attach Image menu built?
The trigger is an icon-only InputGroupButton named Attach. DropdownMenuTrigger renders the InputGroupButton through render. The menu opens above the row. side="top" and align="start" on DropdownMenuContent place it. Each item has its icon before the text.
How is the send button styled?
A filled InputGroupButton with variant="default", size="icon-xs" and pill, showing an arrow. aria-label="Send" names it. It has no action in the demo: submit the prompt from it.
Is GPT-4 a menu or a label?
A label: InputGroupText with fixed text. To let people pick a model, put a menu there instead, as in AI with Voice.
API Reference
Input Group
Sets aria-label="Task", placeholder="Describe your task...", align="block-end", aria-label="Attach", size="icon-xs" and variant="ghost". The rest is on the Input Group page.
Dropdown Menu
Sets align="start" and side="top". The rest is on the Dropdown Menu page.



