Input Group

Base UI

An input with connected icons, text, or actions.

12 results
ReadyResponsive

Usage

Package export
tsx
"use client"

import { Search } from "lucide-react"

import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
} from "@jnpll/elements-ui/input-group"

export function InputGroupDemo() {
  return (
    <InputGroup className="max-w-xs">
      <InputGroupInput placeholder="Search..." />
      <InputGroupAddon>
        <Search />
      </InputGroupAddon>
      <InputGroupAddon align="inline-end">12 results</InputGroupAddon>
    </InputGroup>
  )
}

export default InputGroupDemo;

Examples

Default composition
tsx
"use client"

import { Search } from "lucide-react"

import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
} from "@jnpll/elements-ui/input-group"

export function InputGroupDemo() {
  return (
    <InputGroup className="max-w-xs">
      <InputGroupInput placeholder="Search..." />
      <InputGroupAddon>
        <Search />
      </InputGroupAddon>
      <InputGroupAddon align="inline-end">12 results</InputGroupAddon>
    </InputGroup>
  )
}

export default InputGroupDemo;

API Reference

PropType / descriptionDefault
childrenReactNode

Component content and composition slots.

-
classNamestring

Additional classes, merged with the component styles.

-

Composition & accessibility

Import the composition slots shown in the example. Keep labels and descriptions meaningful; interactive primitives provide keyboard and focus behavior. See the source for the complete typed API.