Components
npx shadcn@latest add https://21st.dev/r/originui/selectLoading preview...
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { useId } from "react";
function Component() {
const id = useId();
return (
<div className="relative rounded-lg border border-input bg-background shadow-sm shadow-black/5 transition-shadow focus-within:border-ring focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring/20 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50 [&:has(input:is(:disabled))_*]:pointer-events-none min-w-[300px]">
<label htmlFor={id} className="block px-3 pt-2 text-xs font-medium text-foreground">
Select with inset label
</label>
<Select>
<SelectTrigger
id={id}
className="border-none bg-transparent shadow-none focus:ring-0 focus:ring-offset-0"
>
<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 };
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...