Skip to content
SENVENLI UI

Input group

Joins an input with addons (text, icons) and actions (buttons) into one bordered control.
Addons around an input
import {
  InputGroup,
  InputAddon,
  InputAction,
  InputGroupInput,
} from "@senvenli/react/form";

Examples

With an action

An icon button inside the frame; its `aria-label` names it.

Invalid and disabled

The frame draws the state; the input still carries it for assistive tech.

Guidelines

When to use it

  • A custom input needs prefix or suffix text, icons or buttons.

Use something else when

  • No addon or action is needed; type already covers search, password and phone. Input
  • The addon is a choice from a list. Combo box

Accessibility

Built in

  • Pressing an addon focuses the input.

You provide

  • Labels for actions that show only an icon.

API reference

InputGroup

childrenRequired
React.ReactNode
size
FieldSize
isDisabled
boolean
isInvalid
boolean
multiline
boolean

Multi-line content (TextArea): items align to the top.

dir
"ltr"

ltr keeps the frame left to right on an RTL page (phone numbers, IBANs).

id
string

The control's id, description link and invalid state. A Field around the group sets them; the group hands them to its InputGroupInput, so the label and the error reach the input, not the frame.

aria-describedby
string
aria-invalid
boolean | "true" | "false"

InputAddon

childrenRequired
React.ReactNode
position
"start" | "end"Default "start"

Which side of the value it sits on.

flush
booleanDefault true

Flush with the frame edge (default). Off when another part, such as a stepper, follows an end addon.

onClick
MouseEventHandler<HTMLSpanElement>

Extra handler; focus forwarding to the control always runs as well.

InputAction

iconRequired
IconName

Lucide icon name ("copy", "circle-x").

Also takes 84 standard DOM and ARIA attributes (id, aria-label, event handlers…).

InputGroupInput

ref
React.Ref<HTMLInputElement>
Also takes 305 standard DOM and ARIA attributes (id, aria-label, event handlers…).