chrome:shell.skip

generated:catalog.entry.select.title

generated:catalog.entry.select.description

@xngui/components/select
@xngui/components/select

chrome:demo.section

chrome:demo.preview

demo-preview:select.scroll-hint

demo-preview:hints.category.navigation:
Tab↑ ↓
demo-preview:hints.category.pointer:
Scroll
demo-preview:hints.category.shortcuts:
Enter / SpaceEscape
demo-preview:projection.slots-label:
[xStart] [xEnd]
import { form } from '@angular/forms/signals';
import { createDataSource } from '@xngui/cdk/datasource';
import { XForm } from '@xngui/components/form';
import { XFormField } from '@xngui/components/form-field';
import { XSelect } from '@xngui/components/select';
 
protected readonly fruits = createDataSource({ data: FRUITS, pageSize: 10 });
private readonly model = signal({ fruit: '' });
 
protected readonly demoForm = form(this.model, (path) => {
syncDemoFieldAvailability(path.fruit, () => this.controlState());
});

chrome:demo.events.title

chrome:demo.events.empty

chrome:demo.api.title

x-select

chrome:demo.api.col.property
chrome:demo.api.col.type
chrome:demo.api.col.default
chrome:demo.api.col.description
dataSource chrome:demo.api.required
XSelectDataSource
—
Menu rows — XDataSource pipeline for static, remote, or paginated options.
selectionMode
XSelectionMode
'single'
Single or multiple selection mode.
size
XSize
—
Visual size tier — falls back to XConfigService when unset.
density
XDensity
—
Spacing offsets — orthogonal to `size`; falls back to XConfigService when unset.
placeholder
string
''
Placeholder text when no option is selected.
look
XFormLook
—
Field chrome — outline, fill, flat, or none; falls back to XForm then XConfigService.
disabled
boolean
false
Prevents interaction and sets `aria-disabled` on the trigger.
readonly
boolean
false
Value-only input — user cannot change when true.
clearable
boolean
false
Show a clear button when a value is selected.
invalid
boolean
false
Marks the control invalid for styling and ARIA.
required
boolean
false
Marks the control as required for validation and ARIA.
name
string
''
Native form control `name` attribute.
controlId
string
—
Native `id` on the trigger; falls back to `name`, then a generated id.
closeOnSelect
boolean
—
Close the menu after a pick (default: true in single, false in multiple).
placement
XPlacement
—
Menu overlay placement relative to the trigger — falls back to XConfigService when unset.
offsetX
number
0
Horizontal offset in pixels for the menu overlay.
offsetY
number
0
Vertical offset in pixels for the menu overlay.
matchMenuWidth
boolean
true
When true (default), the open menu width matches the trigger.
clearLabel
string
—
Accessible label for the clear button.
loadOnOpen
boolean
true
Load the datasource when the menu opens while status is `idle`.
refreshOnOpen
boolean
false
Refresh the datasource each time the menu opens.
loadingLabel
string
—
Text shown while the initial datasource load is in progress.
loadingMoreLabel
string
—
Text shown while loading additional pages.
loadMoreErrorLabel
string
—
Text shown when a load-more request fails.
emptyLabel
string
—
Text shown when the datasource returns no options.
errorLabel
string
—
Text shown when the initial datasource load fails.