Skip to content

Dropdown

Searchable dropdown input supporting text, flag, icon, and multi-select modes.

Open in Storybook

Interactive Demo

Usage

vue
<script setup>
import { ref } from 'vue';
import { DropdownInput } from '@yellowcard/b2b-design-system';

const selected = ref(null);
const options = [
  { label: 'Option 1', value: '1' },
  { label: 'Option 2', value: '2' },
  { label: 'Option 3', value: '3' },
];
</script>

<template>
  <DropdownInput
    v-model="selected"
    :options="options"
    label="Select an option"
    placeholder="Choose..."
  />
</template>

API Reference

Props

PropTypeDefaultDescription
modelValueanySelected value (v-model)
typestringDropdown type (text, flag, icon, multi)
size'large' | 'small''large'Input size
labelstringLabel text
placeholderstringPlaceholder text
helperTextstringHelper text below input
errorbooleanfalseError state
errorMessagestringError message text
disabledbooleanfalseDisabled state
requiredbooleanfalseRequired indicator
options*arrayArray of options
searchablebooleanfalseEnable search filtering
maxTagsnumberMax selected tags in multi-select mode

Events

EventPayloadDescription
update:modelValueanyEmitted when selection changes