Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Input Group

An input with text, icons or buttons attached to it.

Rendered by React 19.3.1

input-group.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/input-group.json

It also adds utils, button, input, textarea. The app needs its setup first: Installation.

Usage

Put an InputGroupInput or InputGroupTextarea inside with InputGroupAddons; align places an addon at the start, the end, or above or below. InputGroupText and InputGroupButton go in an addon.

import {
  InputGroup,
  InputGroupAddon,
  InputGroupButton,
  InputGroupText,
  InputGroupInput,
  InputGroupTextarea,
} from '@/components/ui/input-group'

Examples

Default

A search field with an icon and a button.

Its preview and code are at the top of the page.

API reference

Input Group wraps no headless component of its own: its parts are elements with classes, and their props are the element's.