A wider screen, please

This page features interactive demos and side-by-side code samples that need at least 340 pixels of horizontal space. Please widen your browser window, or rotate your device, to continue.

Morpheus v0.1.0
v0.1.0

Datalist#

Component <neo-datalist> is an option-data container, not a rendered or interactive element. Modeled on native <datalist>, it carries <neo-option> / <neo-optgroup> data that control components like Select, Combobox, or Text input suggestions read. Place a datalist inside a control as its option source, or give it an id and point one or more controls at it with list="<id>", exactly like <input list>.

Reference#

Attributes #

NameTypeDefaultDescription
idstring observednoneNames the datalist so controls can reference it. A control opts in with list="<id>" (like native <input list>); one id can feed several controls. Omit it for an inline datalist placed inside a single control. An inline datalist (or a control's own authored options) always wins over a referenced external one.

Slots #

NameDescription
default<neo-option> and <neo-optgroup> option data: the same children a <neo-select> / <neo-combobox> takes. The element is not interactive; the consuming control reads this data and owns the trigger, listbox, keyboard, and selection. Patching these children re-syncs every control the datalist feeds.

Examples#

Shared across controls#

One <neo-datalist id="…"> supplies the same options to every control whose list="<id>" references it.

  • A control opts in with list set to the datalist's id, just like native <input list>. One id can feed many controls.
  • The datalist itself renders nothing; each control reads it and renders its own way: Select and Combobox as listbox options, Text input as free-text suggestions. Selection stays per-control.
  • Patching the datalist (server morph, edit) updates every control it feeds, with no per-control patch.
New YorkUTC−05:00 São PauloUTC−03:00 LondonUTC+00:00 BerlinUTC+01:00 TokyoUTC+09:00 SydneyUTC+11:00

Settings

Theme

Default Sunshine Ocean Matrix Rose

Accessibility

Playgrounds

Server Simulator