2026-08-03 21:57:26 +08:00
|
|
|
import {
|
|
|
|
|
Select,
|
2026-10-14 22:53:20 +08:00
|
|
|
SelectContent,
|
|
|
|
|
SelectGroup,
|
|
|
|
|
SelectItem,
|
|
|
|
|
SelectLabel,
|
2026-08-03 21:57:26 +08:00
|
|
|
SelectTrigger,
|
|
|
|
|
SelectValue,
|
2026-10-14 22:53:20 +08:00
|
|
|
} from "@lcui/react";
|
|
|
|
|
|
|
|
|
|
const items = [
|
|
|
|
|
{ label: "Apple", value: "apple" },
|
|
|
|
|
{ label: "Banana", value: "banana" },
|
|
|
|
|
{ label: "Blueberry", value: "blueberry" },
|
|
|
|
|
{ label: "Grapes", value: "grapes" },
|
|
|
|
|
{ label: "Pineapple", value: "pineapple" },
|
|
|
|
|
];
|
2026-08-03 21:57:26 +08:00
|
|
|
|
|
|
|
|
export default function Example() {
|
|
|
|
|
return (
|
|
|
|
|
<Select>
|
2026-10-14 22:53:20 +08:00
|
|
|
<SelectTrigger className="w-full max-w-48">
|
|
|
|
|
<SelectValue placeholder="Select a fruit" />
|
2026-08-03 21:57:26 +08:00
|
|
|
</SelectTrigger>
|
|
|
|
|
<SelectContent>
|
2026-10-14 22:53:20 +08:00
|
|
|
<SelectGroup>
|
|
|
|
|
<SelectLabel>Fruits</SelectLabel>
|
|
|
|
|
{items.map((item) => (
|
|
|
|
|
<SelectItem key={item.value} value={item.value}>
|
|
|
|
|
{item.label}
|
|
|
|
|
</SelectItem>
|
|
|
|
|
))}
|
|
|
|
|
</SelectGroup>
|
2026-08-03 21:57:26 +08:00
|
|
|
</SelectContent>
|
|
|
|
|
</Select>
|
2026-10-14 22:53:20 +08:00
|
|
|
);
|
2026-08-03 21:57:26 +08:00
|
|
|
}
|