Select
Native select field with label, helper/error text, and Angular forms support.
- Selector
- ui-select
- Package
- @ngnova/ui/select
Import
import { UiSelectComponent } from '@ngnova/ui/select';Usage & variants
Live examples use the public ui-select API, paired with the exact snippet a product team would paste into an Angular app.
Plan selection
Native select field with label, helper/error text, and Angular forms support.
Native select behavior with NgNova styling.
Production guidance
Use these notes to decide when the component belongs in a product workflow and what to verify before shipping.
When to use
Use for compact single-choice fields where native browser behavior is acceptable.
Watch for
Use disabled options for unavailable choices.
Product recipes
Apply Select in distinct, copyable product scenarios—not just an isolated component state.
Plan select
Use placeholder for an empty starting state and let the form own value.
1 2 3 4 5 6 7
<ui-select
label="Plan"
placeholder="Choose a plan"
helperText="Selection is owned by the reactive form."
[options]="planOptions"
[formControl]="plan"
/>Required select
Pair required with a placeholder and clear error text.
1 2 3 4 5 6 7
<ui-select
label="Release channel"
placeholder="Select channel"
errorText="Choose a stable channel before publishing."
[options]="channelOptions"
required
/>API Reference
Inputs and outputs are semver-sensitive public API. Keep examples aligned with this table.
Inputs
label '' string Visible field label.
placeholder '' string Optional empty option label shown first.
helperText '' string Support text shown below the field.
errorText '' string Error text shown below the field and reflected in aria-invalid.
inputId generated string ID applied to the native select.
name '' string Native select name.
ariaLabel '' string Accessible label when no visible label is provided.
size 'md' 'sm' | 'md' | 'lg' Select height and text scale.
options [] readonly UiSelectOption[] Options rendered as native option elements.
disabled false boolean Disables the native select.
required false boolean Marks the native select as required.
| Name | Type | Default | Description |
|---|---|---|---|
label | string | '' | Visible field label. |
placeholder | string | '' | Optional empty option label shown first. |
helperText | string | '' | Support text shown below the field. |
errorText | string | '' | Error text shown below the field and reflected in aria-invalid. |
inputId | string | generated | ID applied to the native select. |
name | string | '' | Native select name. |
ariaLabel | string | '' | Accessible label when no visible label is provided. |
size | 'sm' | 'md' | 'lg' | 'md' | Select height and text scale. |
options | readonly UiSelectOption[] | [] | Options rendered as native option elements. |
disabled | boolean | false | Disables the native select. |
required | boolean | false | Marks the native select as required. |
Outputs
valueChange OutputEmitterRef<string> Emits the selected value after user interaction.
focused OutputEmitterRef<FocusEvent> Emits when the native select receives focus. The host also forwards a native focus event.
blurred OutputEmitterRef<FocusEvent> Emits when the native select loses focus. The host also forwards a native blur event.
| Name | Type | Description |
|---|---|---|
valueChange | OutputEmitterRef<string> | Emits the selected value after user interaction. |
focused | OutputEmitterRef<FocusEvent> | Emits when the native select receives focus. The host also forwards a native focus event. |
blurred | OutputEmitterRef<FocusEvent> | Emits when the native select loses focus. The host also forwards a native blur event. |
Accessibility
- Visible label, helper text, and error text are associated with the native select.
- Required and disabled states are applied to the native select element.
- Provide ariaLabel when visible label text is omitted; visible labels remain the accessible name when present.
Keyboard behavior
- Uses native select keyboard behavior for the current browser and platform.
Testing guidance
- Assert option rendering, valueChange, CVA writeValue, and disabled state.