Uqudo UIregistry

Input Group

Combines an input with add-ons, buttons and text.

12 results

Installation

npx shadcn@latest add @uqudo/input-group

Installing it also installs Button, Input and Textarea, which it depends on.

Usage

import {
  InputGroup,
  InputGroupAddon,
  InputGroupButton,
  InputGroupInput,
  InputGroupText,
  InputGroupTextarea,
} from "@/components/uqudo/ui/input-group"
<InputGroup>
  <InputGroupAddon>
    <SearchIcon />
  </InputGroupAddon>
  <InputGroupInput placeholder="Search..." />
</InputGroup>

InputGroup draws the border, background and focus ring; InputGroupInput and InputGroupTextarea are borderless versions of the regular controls that sit inside it. Clicking an addon focuses the input.

Examples

With button

InputGroupButton is a compact Button tuned to fit inside an addon.

https://

With textarea

Use align="block-end" (or block-start) to place an addon below or above a textarea.

0/500

API Reference

InputGroup

Prop

Type

InputGroupAddon

Prop

Type

InputGroupButton

Prop

Type

InputGroupInput

Prop

Type

InputGroupTextarea

Prop

Type

InputGroupText

Prop

Type

Data attributes

AttributeElementValue
data-slotInputGroupinput-group
data-slotInputGroupAddoninput-group-addon
data-alignInputGroupAddonThe resolved align.
data-slotInputGroupInput, InputGroupTextareainput-group-control
data-sizeInputGroupButtonThe resolved size.

On this page