Components
Loading preview...
Enhanced shadcn/ui select
npx shadcn@latest add https://21st.dev/r/originui/selectimport { Label } from "@/components/ui/label";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { useId } from "react";
function Component() {
const id = useId();
return (
<div className="space-y-2 min-w-[300px]">
<Label htmlFor={id}>Disabled select</Label>
<Select defaultValue="1" disabled>
<SelectTrigger id={id}>
<SelectValue placeholder="Select framework" />
</SelectTrigger>
<SelectContent>
<SelectItem value="1">React</SelectItem>
<SelectItem value="2">Next.js</SelectItem>
<SelectItem value="3">Astro</SelectItem>
<SelectItem value="4">Gatsby</SelectItem>
</SelectContent>
</Select>
</div>
);
}
export { Component };