Skip to content
On this page

Input

An select enables a person to choose an option.

State

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

State
Positive, Error, Disabled, Readonly, Claerble
<template>
  <div style="display: flex; flex-direction: column; gap: 5px">
    <v-select
      v-for="(val, key) in features"
      v-bind="{ [key]: val }"
      :key="key"
      :options="options"
      :placeholder="`${key} select`"
    />
  </div>
</template>

<script setup lang="ts">
const options = ['mini', 'compact', 'default', 'large'];

const features = {
  error: true,
  positive: true,
  disabled: true,
  readonly: true,
  clearable: true,
  loading: true,
  autoFocus: true,
  searchable: true,
};
</script>

Size

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

Size
Mini, Compact, Default, Large
<template>
  <div style="display: flex; flex-direction: column; gap: 5px">
    <v-select v-for="val in options" :key="val" :size="val" :value="val" :options="options" />
  </div>
</template>

<script setup>
const options = ['mini', 'compact', 'default', 'large'];
</script>

Type

  • mini
  • compact
  • default
  • large

No results

  • mini
  • compact
  • default
  • large

No results

Type
Select, Search
<template>
  <div style="display: flex; flex-direction: column; gap: 5px">
    <v-select size="default" type="select" :options="options" />
    <v-select size="default" type="search" :options="options" />
  </div>
</template>

<script setup lang="ts">
const options = ['mini', 'compact', 'default', 'large'];
</script>

Event

Input

    No results

    value:

    Event
    Params: current inputs val
    <template>
      <v-select @input="val => (value = val)" />
      <p>value: {{ value }}</p>
    </template>
    <script setup>
    import { ref } from 'vue';
    const value = ref('');
    </script>
    

    Change

    • mini
    • compact
    • default
    • large

    No results

    value:

    Event
    Params: current inputs val
    <template>
      <v-select @change="val => (value = val)" :options="options" />
      <p>value: {{ value }}</p>
    </template>
    <script setup>
    import { ref } from 'vue';
    const options = ['mini', 'compact', 'default', 'large'];
    const value = ref('');
    </script>
    

    Blur

      No results

      Blur Times: 0

      Event
      Params: MouseEvent
      <template>
        <v-select @blur="num++" />
        <p>Blur Times: {{ num }}</p>
      </template>
      <script setup>
      import { ref } from 'vue';
      const num = ref(0);
      </script>
      

      Focus

        No results

        Focus Times: 0

        Event
        Params: MouseEvent
        <template>
          <v-select @focus="num++" />
          <p>Focus Times: {{ num }}</p>
        </template>
        <script setup>
        import { ref } from 'vue';
        const num = ref(0);
        </script>
        

        Clear

          No results

          Clear Times: 0

          Event
          Params: null
          <template>
            <v-select @clear="num++" clearable />
            <p>Clear Times: {{ num }}</p>
          </template>
          <script setup>
          import { ref } from 'vue';
          const num = ref(0);
          </script>
          

          V-Model

            No results

            v-model: default

            Event
            Params: current inputs val
            <template>
              <v-select v-model="value" />
              <p>v-model: {{ value }}</p>
            </template>
            <script setup>
            import { ref } from 'vue';
            const value = ref('default');
            </script>