Select
Uses native select, optgroup, and option elements with an inset field and decorative chevron. Preserves the platform picker on mobile and native form submission.
@neumorphism-ui/selectPreview
Installation
Installation: select
npx shadcn@latest add @neumorphism-ui/selectThe CLI resolves npm dependencies, base tokens, utilities, and component source in order.
New to this Registry? Set up the namespace before continuing.
Usage
Usage: Installation
npx shadcn@latest add @neumorphism-ui/select @neumorphism-ui/labelImport
Select import code
import {
Select,
SelectGroup,
SelectItem,
} from "@/components/ui/select"
import { Label } from "@/components/ui/label"Example
Select usage code
<div className="grid gap-2">
<Label htmlFor="role">Role</Label>
<Select id="role" name="role" defaultValue="designer">
<SelectItem value="designer">Designer</SelectItem>
<SelectItem value="developer">Developer</SelectItem>
<SelectItem value="founder">Founder</SelectItem>
</Select>
</div>API Reference
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Select | value / defaultValue | string | string[] | — | The controlled selected value or initial uncontrolled value. |
Select | onChange | React.ChangeEventHandler<HTMLSelectElement> | — | Called when the native select value changes. |
Select | disabled / required / multiple | boolean | false | Sets native select constraints and multiple selection. |
SelectItem | valuerequired | string | number | readonly string[] | — | The value submitted by the option. |
SelectGroup | labelrequired | string | — | The label for an optgroup of options. |
Accessibility
- 01
Connect Label htmlFor to the Select id.
- 02
When the first option acts as a placeholder, combine an empty value with disabled and retain a real Label.
- 03
Because it uses native select, operating-system keyboard and mobile picker behavior is preserved.