Search documentation

Search the documentation and open a page.

Displays a native select control with consistent styling.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/native-select

Composition

<app-native-select> ├── <optgroup appNativeSelectOptGroup> (optional) │ └── <option appNativeSelectOption> └── <option appNativeSelectOption>

Examples

Controlled

Loading...

Default

Loading...

Disabled

Loading...

Grouped Options

Loading...

In A Form

Loading...

Invalid State

Loading...

Sizes

Loading...

API Reference

<app-native-select>

Inputs

InputTypeDefaultDescription
classstring""Additional classes applied to the native select element.
idstring | undefined—ID applied to the native select element.
namestring | undefined—Name submitted with the select's form value.
size"default" | "lg" | "sm" | "xl""default"Controls the select's visual dimensions.
valuestring | undefined—Selected value when controlled. Supports Angular two-way binding.
defaultValuestring | undefined—Initial selected value when uncontrolled.
disabledbooleanfalseDisables the select.
requiredbooleanfalseMarks the select as required.
invalidbooleanfalseMarks the select as invalid for assistive technology and styling.

Outputs

OutputTypeDescription
valueChangestringEmits the selected value after a native change.