Merge pull request #9755 from Shitanshukumar607/fix-missing-items

fix the missing items in select page (base ui)
This commit is contained in:
shadcn
2026-03-01 11:32:42 +04:00
committed by GitHub

View File

@@ -67,15 +67,23 @@ import {
```
```tsx showLineNumbers
<Select>
const items = [
{ label: "Light", value: "light" },
{ label: "Dark", value: "dark" },
{ label: "System", value: "system" },
]
<Select items={items}>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder="Theme" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="light">Light</SelectItem>
<SelectItem value="dark">Dark</SelectItem>
<SelectItem value="system">System</SelectItem>
{items.map((item) => (
<SelectItem key={item.value} value={item.value}>
{item.label}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>