Select

Form

A styled native select for choosing from a list of options, with optional option groups.

Props

PropTypeDefaultDescription
modelValuestring | number | nullSelected value (v-model).
options(DsSelectOption | DsSelectGroup)[]Options or option groups.
placeholderstringPlaceholder option label.
size'sm' | 'md' | 'lg''md'Height of the select.
errorbooleanfalseError border state.
disabledbooleanfalseDisable the select.

Examples

Interactive
vue
<script setup lang="ts">
const value = ref('')
const options = [
  { label: 'Design', value: 'design' },
  { label: 'Engineering', value: 'eng' },
  { label: 'Product', value: 'product' },
]
</script>
<template>
  <DsSelect v-model="value" :options="options" placeholder="Select a team" class="w-64" />
</template>

Skeleton

Use DsSelectSkeleton as a loading placeholder while content is being fetched.

Small
vue
<DsSelectSkeleton size="sm" />
Medium
vue
<DsSelectSkeleton size="md" />
Large
vue
<DsSelectSkeleton size="lg" />

Accessibility

  • Uses native <select> for maximum accessibility and keyboard support.
  • Error state sets visual red border.