Skip to content
Ballpoint

Input Group

One drawn box around a field and what sits beside it: an icon, a prefix, a button, a shortcut.

From shadcn/ui
12 results
@example.com
$
USD

Installation

pnpm dlx shadcn@latest add @ballpoint/input-group

Usage

tsx
import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group"

<InputGroup>
  <InputGroupInput placeholder="Search…" />
  <InputGroupAddon>…</InputGroupAddon>
</InputGroup>

Examples

With buttons

Copy a value, or show and hide a password, from inside the box.

With a textarea

A message field with its tools underneath.

0 / 280

Above and below

A label or hint inside the box, over or under the field.

Database name
As it should appear on the page.

API reference

InputGroupAddon align
default "inline-start"
"inline-start" | "inline-end" | "block-start" | "block-end"

Which side of the field the addon sits on. Block addons stack above or below it.

InputGroupButton size
default "xs"
"xs" | "sm" | "icon-xs" | "icon-sm"

Buttons small enough to live inside the box.

InputGroupInput / Textarea
input / textarea

The field itself, with no box of its own.

seed
string | number

Pins the drawing.

Pen settings

The drawing also takes draw, roughness, passes, radius, corners, weight and speed, as props or from the nearest InkProvider. What each one does.