InputGroup

Input field group with proximity hover, three surfaces, and validation.

Installation

This component is primitive-agnostic — same source under both flavors.

Basic

Inspect

InputGroup is for a stack of labelled fields sharing one hover scope. For a single standalone field, compose Field with Input or Textarea; the outlined variant shares their hairline and focus treatment.

Outlined

Inspect

The default ghost field intentionally has a transparent outline at rest. Filled adds a surface tint only. outlined keeps the standalone Input’s --border hairline at rest and shares its hover fill and neutral focus border, so a search or filter has a visible boundary before hover. controlClassName="ring-border" remains available for one-off overrides. Keep the label available to assistive technology with labelHidden rather than relying on the placeholder as its name.

Focus darkens the field to foreground/40 and wins over the destructive tint while the value is being corrected; the error ring returns when focus leaves. Put page resets in @layer base and product layout rules in @layer components. Unlayered generic input, button, or link rules can override component utilities, hide button labels, or add a second browser focus frame. The compound field owns its outline; do not add borders or focus rings to its inner input. Preserve hidden native form controls, input semantics, and OS file dialogs.

Multiple Fields

Inspect

Error State

Inspect
Please enter a valid email address.

API Reference — InputGroup

PropTypeDefaultDescription
childrenReactNode—InputField children.
size"default" | "compact"from SizeProviderPins every field in the group to one step of the size ladder.
axis"x" | "y" | "xy""y"Direction for proximity hover. Use "xy" for grid layouts.

API Reference — InputField

PropTypeDefaultDescription
labelstring—Accessible label text above the input.
labelHiddenbooleanfalseVisually hides the label while keeping its accessible name.
indexnumber—Position index within the group.
valuestring—Controlled input value.
onChange(value: string) => void—Called when the input value changes.
placeholderstring—Placeholder text.
iconIconComponent—Leading icon inside the input.
leadingContentReactNode—Content inside the field before the input.
trailingContentReactNode—Content inside the field after the input.
variant"ghost" | "filled" | "outlined""ghost"Ghost is transparent at rest; filled adds a subtle fill, not a persistent border; outlined keeps the standalone Input's --border hairline.
controlClassNamestring—Styles the outer field container for one-off overrides; "ring-border" remains the escape hatch.
errorstring—Error message shown below the input.
disabledbooleanfalseDisables the input.