input-group

Input group with prefix icon

Input group with prefix icon

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

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

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

<template>
  <Field class="max-w-xs">
    <InputGroup>
      <InputGroupAddon>
        <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-search"
        >
          <path d="m21 21-4.34-4.34" />
          <circle cx="11" cy="11" r="8" />
        </svg>
      </InputGroupAddon>
      <InputGroupInput placeholder="Search..." />
    </InputGroup>
  </Field>
</template>

Установка

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

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

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