Selection field

Dropdown

Single or multiple selection in a field you can read at rest — chips, a limit, and a panel you may replace entirely.

Reviewers are notified once the pull request opens

v-modelundefined

A value you can read, a list you can walk

The box shows what is chosen; the panel is where choosing happens. Everything else follows from those two jobs.

  • The model is the truthA field holds a value before it holds options. A preset value survives an empty list, renders from its own row until the options arrive, and is never rewritten behind your back.
  • Identity is the idEvery item declares an id, and the default comparator uses it. Refetch the list, get new object references, keep the selection.
  • One field familyvariant, rounded, labelPlacement, density, error and helper text are the same props, with the same meanings, as every other field in the kit.
  • Autocomplete is this component plus a queryBoth share one engine. Reach for the dropdown when the list is short enough to read; reach for the autocomplete when it has to be filtered first.

Start here

Items, a value resolver, and one v-model. Everything else is optional.

Selected: undefined

01

Bind one value

v-model carries whatever item-value resolves to — the item itself by default, a scalar when you point it at a key.

02

Name the rows

item-title defaults to the item’s label; pass a key or a function when your data calls it something else.

03

Let it be emptied

clearable adds a control that returns the field to undefined — unless mandatory says a value must stay.

Vue
<m-dropdown
  v-model="stage"
  :items="stages"
  item-value="id"
  label="Stage"
  clearable
/>