Forms

HTML select

@xui/html-select

A styled native <select> — the platform dropdown, keyboard and mobile behaviour kept, only framed with a chevron. Options as data or projected <option> elements. Full ControlValueAccessor.

Install

pnpm add @xui/html-select

Add the barrel to a standalone component's imports:

import { XuiHtmlSelectImports } from '@xui/html-select';

@Component({
  imports: [XuiHtmlSelectImports],
  // …
})

Examples

Default

Loading preview…

With placeholder

Loading preview…

Projected

Loading preview…

Small

Loading preview…

API

XuiHtmlSelect

componentxui-html-select

A styled native <select>.

Variants

AxisOptionsDefaultsizemdsmmdfilltruefalsefalse

Inputs

NameTypeDefaultclassClassValueThe user-defined classes on the wrapper. Merged last so they win.''sizeXuiHtmlSelectVariants['size']Control height, from the shared control scale.this.config.sizefillbooleanStretch to the available width instead of hugging its contents.this.config.filloptionsreadonly XuiHtmlSelectOption<T>[]Options as data; alternatively, project <option> elements.[]placeholderstring | nullA leading, unselectable prompt shown when nothing is chosen.nullariaLabelstring | nullAccessible name for the select, when no <label> points at it.nulldisabledbooleanBlock interaction and dim the control.false

Source

libs/ui/html-select/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.