Components
Loading preview...
Native select in shadcn/ui style
npx shadcn@latest add https://21st.dev/r/originui/select-nativeimport { Label } from "@/components/ui/label";
import { SelectNative } from "@/components/ui/select-native";
import { useId } from "react";
function Component() {
const id = useId();
return (
<div className="space-y-2 min-w-[300px]">
<Label htmlFor={id}>Select with placeholder (native)</Label>
<SelectNative id={id} defaultValue="">
<option value="" disabled>
Please select a value
</option>
<option value="1">1 to 5</option>
<option value="2">5 to 10</option>
<option value="3">More than 10</option>
</SelectNative>
</div>
);
}
export { Component };