shadcn.io is an independent project built on shadcn/ui
The label lives inside the frame. Comment sits in a header with a line under it, then the textarea, then Post Comment in the footer. Clicking Comment focuses the field. The placeholder says Share your thoughts...
Use it for a comment composer that should read as one box. A label outside the frame is a Field. In React, Base UI does not post the comment.
Installation
Anatomy

Usage
<InputGroup className="w-full max-w-sm bg-background">
<InputGroupTextarea
className="min-h-[100px]"
id="input-group-comment"
placeholder="Share your thoughts..."
/>
<InputGroupAddon align="block-start" className="border-b">
<Label className="text-foreground" htmlFor="input-group-comment">
Comment
</Label>
</InputGroupAddon>
<InputGroupAddon align="block-end">
<InputGroupButton className="ms-auto" size="sm" variant="default">
Post Comment
</InputGroupButton>
</InputGroupAddon>
</InputGroup>FAQ
How does the label sit inside the box?
It's in an InputGroupAddon with align="block-start" and border-b, written after the textarea. Block start puts the addon above it as a header row.
How is the label tied to the textarea?
Label has htmlFor set to the textarea's id. Outside a Field, that pair is what names the control and makes the label clickable.
Why does the label use text-foreground?
Addons use the muted text color; text-foreground keeps the label at full contrast, as a label should be.
Where is the Post Comment button?
In a second addon with align="block-end", under the textarea, pushed to the end by ms-auto.
API Reference
Input Group
Sets id="input-group-comment", placeholder="Share your thoughts...", align="block-start", align="block-end", size="sm" and variant="default". The rest is on the Input Group page.
Label
Sets htmlFor="input-group-comment". The rest is on the Label page.





