Install
Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code). It also installs Button, Input and Textarea.
npx shadcn-vue@latest add https://beehexa.design/r/input-group.json
Use
<script setup lang="ts">
import { Search } from '@lucide/vue'
import { InputGroup, InputGroupAddon, InputGroupInput } from '@/components/ui/input-group'
</script>
<template>
<InputGroup>
<InputGroupAddon>
<Search aria-hidden="true" />
</InputGroupAddon>
<InputGroupInput type="search" aria-label="Search orders" />
</InputGroup>
</template>
Props
| Part | Prop | Values | Notes |
|---|---|---|---|
InputGroupAddon |
align |
inline-start (default), inline-end, block-start, block-end |
Where the addon sits. Block addons make the box grow |
InputGroupButton |
size |
xs (default), sm, icon-xs, icon-sm |
xs and icon-xs are 24 px and fit the 32 px box |
InputGroupButton |
variant |
Button variants; ghost (Subtle) by default |
|
InputGroupInput, InputGroupTextarea |
v-model |
The same as Input and Textarea | |
| All | class |
string | Merged with the Beehexa classes |
Clicking an addon outside its button moves focus to the input.
Built on
The shadcn-vue InputGroup API, from the control-center copy. It uses the Beehexa Input, Textarea and Button. The box takes the text-field focus through :has() when the field inside has focus.