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

API REFERENCE · FORM CONTROLS

<dj-select>

A form-associated single-select combobox. A trigger shows the selected option; clicking (or ArrowDown/Enter/Space) opens a <dj-popup> containing a <dj-list> of options. Selecting sets value, closes, and returns focus. ARIA combobox/listbox. Composes label, helper-text, icon, popup, list. Parts: label, trigger, helper-text.

Try it in the playground

@dojo-ng/select · v0.1.2

npm install @dojo-ng/select

import "@dojo-ng/select";

Properties

PropertyAttributeTypeDefault
options options ListOption[] []
value value string ""
name name reflected string None
label label string None
helperText helper-text string None
placeholder placeholder string None
disabled disabled reflected boolean false
required required reflected boolean false
position position reflected "above""below""left""right" "below"
open open reflected boolean false

Events

change

CSS parts

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

labeltriggerhelper-text

Methods

checkValidity(): booleanreportValidity(): booleanfocus(o: FocusOptions)

Types

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

ListOption from @dojo-ng/list

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