shadcn.io is an independent project built on shadcn/ui
Settings opens a panel titled Settings. One text field shows the placeholder Enter value. Save spans the panel and closes it.
Use it for a single quick setting. Save does not store the value until you handle it. Anything longer belongs in a Dialog. In React, Base UI does not save the setting.
Installation
Anatomy

Usage
<Popover onOpenChange={setOpen} open={open}>
<PopoverTrigger render={<Button variant="outline" />}>
Settings
</PopoverTrigger>
<PopoverContent>
<PopoverTitle>Settings</PopoverTitle>
<Input aria-label="Value" placeholder="Enter value" type="text" />
<Button className="w-full" onClick={handleSave}>
Save
</Button>
</PopoverContent>
</Popover>FAQ
What is in the settings panel?
PopoverTitle reads Settings. The field is an Input with type="text", aria-label="Value", and placeholder="Enter value". Save is a Button with className="w-full". The input leaves value and onChange unset, so it is uncontrolled.
How do I close this panel from code?
Save closes the panel and leaves the input's text unread.
Here the panel is controlled: open and onOpenChange on Popover, and the button's handler sets the state to false. The callback gets the next open state first.
How does the Settings button become the trigger?
The trigger is a Button with variant="outline" and the label Settings. Activating it opens the panel beside the button.
Pass the button to render on PopoverTrigger, and use PopoverContent as the panel.
When does this belong in a dialog?
This panel is one Input and a Save button, and focus moves into it when it opens. A task with more fields belongs in a Dialog. Escape or a click outside still closes this panel.
API Reference
Popover
Sets onOpenChange={setOpen} and open={open}. The rest is on the Popover page.
Button
Sets variant="outline" and onClick={handleSave}. The rest is on the Button page.
Input
Sets aria-label="Value", placeholder="Enter value" and type="text". The rest is on the Input page.




