Formssrc/components/ui/native-select.tsx
Native Select
A styled native select control with minimal JavaScript.
Preview
Installation
Copy the component source into your project with `degit`. This port is intentionally not distributed as an npm package.
bunx degit https://github.com/LiasCode/shadcn-preact/src/components/ui#main ./src/components/uiUsage
import {
NativeSelect,
NativeSelectOption,
NativeSelectOptGroup
} from "@/components/ui/native-select"
export function Example() {
return (
<NativeSelect>
{/* compose the parts you need */}
</NativeSelect>
)
}API Reference
ExportPurpose
NativeSelectComposable part exported by `@/components/ui/native-select`.NativeSelectOptionComposable part exported by `@/components/ui/native-select`.NativeSelectOptGroupComposable part exported by `@/components/ui/native-select`.