Skip to content

Components

Input Group

Combines a native input or textarea with text, icons and action buttons.

Customize
Ombelle · light

Installation

Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.

pnpm dlx @ombelle-ui/cli@1.1.2 add input-group

Adds components/ui/input-group.tsx and installs react, clsx, tailwind-merge, lucide-react with lifecycle scripts disabled.

In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.

Usage

example.tsx
import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupText, InputGroupButton } from '@/components/ui/input-group'
export function Example(){return <div style={{ display: "grid", gap: "0.5rem" }}><label htmlFor="website">Website</label><InputGroup><InputGroupAddon><InputGroupText>https://</InputGroupText></InputGroupAddon><InputGroupInput id="website" placeholder="example.com" /><InputGroupAddon align="inline-end"><InputGroupButton>Check</InputGroupButton></InputGroupAddon></InputGroup></div>}

API and states

API
InputGroup, InputGroupInput, InputGroupTextarea, InputGroupAddon (align), InputGroupText, InputGroupButton, InputGroupClear (label, onClear), InputGroupCount (value, max)
Minimum states
Focus within, invalid, disabled, multiline
Native basis
Native input, textarea and button in a group
Styles
Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.