input-group

Input group with block-start addon

Input group with block-start addon

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

src/input-group/c-input-group-16.vue

<!--
  Расхождение с апстримом: `IconPlaceholder` заменена инлайновым `<svg>`
  (lucide-react v0.545.0 "info") — см. docs/PORTING.md §5.
-->
<script setup lang="ts">
import { Field } from "@/components/ui/field"
import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "@/components/ui/input-group"
</script>

<template>
  <Field class="w-full max-w-xs">
    <InputGroup class="h-auto">
      <InputGroupInput placeholder="First name" />
      <InputGroupAddon align="block-start">
        <InputGroupText class="font-medium">User Profile</InputGroupText>
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          viewBox="0 0 24 24"
          fill="none"
          stroke="currentColor"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="lucide lucide-info ml-auto"
        >
          <circle cx="12" cy="12" r="10" />
          <path d="M12 16v-4" />
          <path d="M12 8h.01" />
        </svg>
      </InputGroupAddon>
    </InputGroup>
  </Field>
</template>

Установка

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

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

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