input

Input label with optional badge

Input label with optional badge

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

src/input/c-input-18.vue

<script setup lang="ts">
import { Badge } from "@/components/reui/badge"
import { Field, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
</script>

<template>
  <Field class="max-w-xs">
    <div class="flex items-center justify-between gap-2">
      <FieldLabel for="middle-name">Middle Name</FieldLabel>
      <Badge variant="warning-outline" size="sm">Optional</Badge>
    </div>
    <Input id="middle-name" placeholder="Alexander" />
  </Field>
</template>

Установка

npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-input-18.json

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

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