native-select

Native select embedded within a field.

Native select embedded within a field.

Загрузка превью…

src/native-select/c-native-select-4.vue

<script setup lang="ts">
import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"
import { NativeSelect, NativeSelectOption } from "@/components/ui/native-select"
</script>

<template>
  <Field class="w-full max-w-xs">
    <FieldLabel for="native-select-country">Country</FieldLabel>
    <NativeSelect id="native-select-country">
      <NativeSelectOption value="">Select a country</NativeSelectOption>
      <NativeSelectOption value="us">United States</NativeSelectOption>
      <NativeSelectOption value="uk">United Kingdom</NativeSelectOption>
      <NativeSelectOption value="ca">Canada</NativeSelectOption>
    </NativeSelect>
    <FieldDescription>Select your country of residence.</FieldDescription>
  </Field>
</template>

Установка

npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-native-select-4.json

Зависимости реестра

Источник: порт из ReUI (Keenthemes, MIT)