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]"
style={{ "--ring": "234 89% 74%" } as React.CSSProperties}
>
<Label htmlFor={id}>Select with colored border and ring</Label>
<Select defaultValue="1">
<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 };