Installation
This component is primitive-agnostic — same source under both flavors.
Basic
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
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
Error State
API Reference — InputGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | InputField children. |
| size | "default" | "compact" | from SizeProvider | Pins 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
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Accessible label text above the input. |
| labelHidden | boolean | false | Visually hides the label while keeping its accessible name. |
| index | number | — | Position index within the group. |
| value | string | — | Controlled input value. |
| onChange | (value: string) => void | — | Called when the input value changes. |
| placeholder | string | — | Placeholder text. |
| icon | IconComponent | — | Leading icon inside the input. |
| leadingContent | ReactNode | — | Content inside the field before the input. |
| trailingContent | ReactNode | — | 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. |
| controlClassName | string | — | Styles the outer field container for one-off overrides; "ring-border" remains the escape hatch. |
| error | string | — | Error message shown below the input. |
| disabled | boolean | false | Disables the input. |