label

Label with required indicator

Label with required indicator

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

src/label/c-label-5.vue

<script setup lang="ts">
import { Field } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
</script>

<template>
  <Field class="w-full max-w-xs">
    <Label for="label-required">
      Email address
      <span class="text-destructive">*</span>
    </Label>
    <Input
      id="label-required"
      type="email"
      placeholder="you@example.com"
      required
    />
  </Field>
</template>

Установка

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

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

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