Forms & selection@neumorphism-ui/select

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/select
Registry JSON

Preview

Installation

Installation: selectnpx shadcn@latest add @neumorphism-ui/select

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Usage: Installationnpx shadcn@latest add @neumorphism-ui/select @neumorphism-ui/label

Import

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

ComponentPropTypeDefaultDescription
Selectvalue / defaultValuestring | string[]—The controlled selected value or initial uncontrolled value.
SelectonChangeReact.ChangeEventHandler<HTMLSelectElement>—Called when the native select value changes.
Selectdisabled / required / multiplebooleanfalseSets native select constraints and multiple selection.
SelectItemvaluerequiredstring | number | readonly string[]—The value submitted by the option.
SelectGrouplabelrequiredstring—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.