input-group
Input group wrapped in a button group with text prefixes/suffixes
Input group wrapped in a button group with text prefixes/suffixes
Загрузка превью…
src/input-group/c-input-group-27.vue
<!--
Расхождение с апстримом: `IconPlaceholder` заменена инлайновым `<svg>`
(lucide-react v0.545.0 "info") — см. docs/PORTING.md §5.
-->
<script setup lang="ts">
import { ButtonGroup, ButtonGroupText } from "@/components/ui/button-group"
import { Field } from "@/components/ui/field"
import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group"
</script>
<template>
<Field class="max-w-xs">
<ButtonGroup>
<ButtonGroupText>https://</ButtonGroupText>
<InputGroup>
<InputGroupInput placeholder="example" />
<InputGroupAddon align="inline-end">
<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 text-muted-foreground size-4"
>
<circle cx="12" cy="12" r="10" />
<path d="M12 16v-4" />
<path d="M12 8h.01" />
</svg>
</InputGroupAddon>
</InputGroup>
<ButtonGroupText>.com</ButtonGroupText>
</ButtonGroup>
</Field>
</template>
Установка
npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-input-group-27.jsonЗависимости реестра
Источник: порт из ReUI (Keenthemes, MIT)