Dojo NG is being built in the open, one section at a time — follow along on Heptapod.

API REFERENCE · FORM CONTROLS

<dj-native-select>

A form-associated wrapper over a native <select>, driven by an options array, composing <dj-label>, <dj-helper-text>, and a <dj-icon> chevron. A blank option is prepended while nothing is selected. Parts: label, control, select, helper-text.

Try it in the playground

@dojo-ng/native-select · v0.1.2

npm install @dojo-ng/native-select

import "@dojo-ng/native-select";

Properties

PropertyAttributeTypeDefault
value value string ""
name name reflected string None
options options MenuOption[] []
label label string None
helperText helper-text string None
disabled disabled reflected boolean false
required required reflected boolean false
labelHidden label-hidden boolean false
placeholder placeholder string None
size size number None

Events

change

CSS parts

Style these with dj-native-select::part(name).

labelcontrolselecthelper-textarrow

Methods

checkValidity(): booleanreportValidity(): booleanfocus(options: FocusOptions)

Types

The types that the properties above use, as they are declared in the source.

MenuOption

export interface MenuOption { value: string; label?: string; disabled?: boolean; }