A select menu is an input control that allows users to choose one option from a list.

Preview

Usage

DtSelectMenu is bound to a value using v-model, which emits the selected option's value. To wire DtSelectMenu to a reactive store (such as Vuex or Pinia), bind :modelValue to the store getter and listen for @update:modelValue to commit the mutation — or use v-model with a computed setter.

Do

  • Use sparingly — only when a user needs to choose from about seven to 15 possible options, and you have limited space to display the options.

Don’t

  • For site navigation.
  • If the list of options is very short. Use Radio instead.
  • If the list of options is very long. Let users type the same information into an Input that suggests possible options instead (aka Combobox).
  • Avoid using the multiple attribute. Users often don’t understand how to select multiple items from the select element (e.g. by holding down a modifier key).
  • For selecting an action that takes immediate effect. A select is for selecting a choice that is only confirmed by a separate submit action (much like a Checkbox). For immediate actions consider the Dropdown component.

Best Practices

  • Selects should be considered the “UI of last resort,” as users often find them confusing and difficult to use. Consider testing thoroughly with members of your target audience.
  • Avoid making options in one dropdown menu change based on the input to another. Users often don’t understand how selecting an item in one impacts another.
  • When most users will (or should) pick a particular option, make it the default selection.
  • Avoid auto-submission. Be wary of UI implications of automatically submitting upon selection or applying its value. Users may often change their choices multiple times, particularly if interacting with a form solely with keyboard. Auto-submission is also less accessible. For auto-submission consider the Dropdown component.

Variants

Base

A select is normally paired with a label, but there are times when it can be used without a label. Don't rely on the placeholder text as a label.

With Description Text

With Validation States

Provides feedback to the user based on their interaction, or lack thereof, with a select.

With Validation States Hidden

With Slotted Label

With Slotted Description

With Slotted Options

Sizes

We offer different sizes for instances in which the interface requires a smaller or larger select. In general, though, use the base (medium) size select as much as possible, especially in forms.

Accessibility

  • Make sure the label for attribute match the select id.
  • Avoiding removing labels. Labelled selects are user-friendly.
  • Avoid relying on placeholder text as a substitute for a label.
  • Avoid customizing the placeholder text.
  • If the select is a required field, use the aria-required property and use the validation message for input errors.
  • Select with validation errors should have aria-describedby with the id of the validation message.

Vue API

Slots

Name
Description
default

Slot for select menu options, defaults to options prop

description

Slot for description, defaults to description prop

label

Slot for label, defaults to label prop

Props

Name
Description
Default
description

Description for the select

Type: string
''
descriptionChildProps

A set of props that are passed into the description container

Type: object
{}
descriptionClass

Used to customize the description container

Type: string|array|object
''
disabled

Disabled state of the select

Type: boolean
Values: truefalse
false
label

Label for the select

Type: string
''
labelChildProps

A set of props that are passed into the label container

Type: object
{}
labelClass

Used to customize the label container

Type: string|array|object
''
messages

Validation messages

Type: array
[]
messagesChildProps

A set of props that are passed into the validation messages component

Type: object
{}
messagesClass

Used to customize the validation messages component

Type: string|array|object
''
modelValue

The value of the select menu

Type: string|number
''
optionChildProps

A set of props that are passed into each option, should options be provided via prop

Type: object
{}
optionClass

Used to customize each option, should options be provided via prop

Type: string|array|object
''
options

Select Menu Options, overridden by default slot. Each option has the following structure: { value: number || string (required), label: string (required) }

Type: array
[]
rootClass

Additional class name for the root element. Can accept all of: String, Object, and Array, i.e. has the same api as Vue's built-in handling of the class attribute.

Type: string|object|array
''
selectClass

Used to customize the select

Type: string|array|object
''
showMessages

Used to hide / show the validation messages

Type: boolean
Values: truefalse
true
size

Controls the size of the select

Type: string
Values: xssmmdlgxl
'md'

Events

Name
Description
change

Native change event

Type: String | Number
input

Native input event

Type: String | Number
update:modelValue

Event fired to sync the modelValue prop with the parent component

Type: String | Number

Classes

Class
Applies to
Description
Select menu documentation last updated Thursday, June 11, 2026