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, Ark UI does not save the setting.
Installation
Anatomy

Usage
<Popover>
<PopoverTrigger asChild>
<Button variant="outline">Settings</Button>
</PopoverTrigger>
<PopoverContent>
<PopoverTitle>Settings</PopoverTitle>
<Input aria-label="Value" placeholder="Enter value" type="text" />
<PopoverClose asChild>
<Button className="w-full">Save</Button>
</PopoverClose>
</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 each button sits in PopoverClose, which closes the panel without any state. To close it from your own code, control the open state on Popover.
Pass open and onOpenChange on Popover. The callback gets { open }.
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.
Set asChild on PopoverTrigger and pass that one button. PopoverContent is 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 asChild. The rest is on the Popover page.
Button
Sets variant="outline". 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.




