shadcn.io is an independent project built on shadcn/ui
The title is Appearance. Theme offers Light, Dark, and System, with Dark selected. Compact Mode is off. Enable Animations is on.
Use it for look-and-feel choices that should not cover the page. You still apply the theme yourself. A Toggle Group is enough for Light and Dark only. In React, Base UI does not change the theme.
Installation
Anatomy

Usage
<Sheet>
<SheetTrigger render={<Button variant="outline" />}>
Appearance
</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Appearance</SheetTitle>
<SheetDescription>Customize how the app looks</SheetDescription>
</SheetHeader>
<FieldGroup className="gap-4 p-4">
<FieldSet className="gap-3">
<FieldLegend variant="label">Theme</FieldLegend>
<RadioGroup defaultValue="dark">
{THEMES.map((theme) => (
<Field key={theme.value} orientation="horizontal">
<RadioGroupItem id={theme.id} value={theme.value} />
<FieldLabel className="font-normal" htmlFor={theme.id}>
{theme.label}
</FieldLabel>
</Field>
))}
</RadioGroup>
</FieldSet>
<Field className="justify-between" orientation="horizontal">
<FieldLabel htmlFor="theme-compact">Compact Mode</FieldLabel>
<Checkbox id="theme-compact" />
</Field>
<Field className="justify-between" orientation="horizontal">
<FieldLabel htmlFor="theme-animations">Enable Animations</FieldLabel>
<Checkbox defaultChecked id="theme-animations" />
</Field>
{/* The rest of the file is under Installation. */}FAQ
How are Light, Dark, and System built?
As a RadioGroup with defaultValue="dark", inside a FieldSet whose FieldLegend reads Theme. Picking one clears the others, which three checkboxes couldn't do.
What are Compact Mode and Enable Animations?
Two checkboxes in horizontal Field rows, label first. Compact Mode starts off and Enable Animations starts on.
Does this sheet store the theme?
No. The radio group and the checkboxes are uncontrolled, and nothing writes the choice anywhere. Control the radio group's value and pass it to your theme provider, and store it if it should survive a reload.
Why is Appearance a SheetTitle?
SheetTitle names the dialog for assistive tech, so every sheet renders one; hide it with sr-only when the design has no visible heading. It reads Appearance, with Customize how the app looks as the description.
API Reference
Sheet
No extra props in this demo. The rest is on the Sheet page.
Button
Sets variant="outline". The rest is on the Button page.
Field
Sets variant="label", orientation="horizontal", htmlFor={theme.id}, htmlFor="theme-compact" and htmlFor="theme-animations". The rest is on the Field page.
Radio Group
Sets defaultValue="dark", id={theme.id} and value={theme.value}. The rest is on the Radio Group page.
Checkbox
Sets id="theme-compact", defaultChecked and id="theme-animations". The rest is on the Checkbox page.





