Select 1

PreviousNext

A basic native select dropdown for gender selection

Docs
shadcn-studiocomponent

Preview

Loading preview…
registry/new-york/components/select/select-01.tsx
import { useId } from 'react'

import { Label } from '@/registry/new-york/ui/label'
import { SelectNative } from '@/registry/new-york/ui/select-native'

const SelectNativeDemo = () => {
  const id = useId()

  return (
    <div className='w-full max-w-xs space-y-2'>
      <Label htmlFor={id}>Native select default</Label>
      <SelectNative id={id}>
        <option value='1'>Male</option>
        <option value='2'>Female</option>
        <option value='3'>Other</option>
      </SelectNative>
    </div>
  )
}

export default SelectNativeDemo

Installation

npx shadcn@latest add @shadcn-studio/select-01

Usage

import { Select01 } from "@/components/select-01"
<Select01 />