Input Group
Base UIAn input with connected icons, text, or actions.
ReadyResponsive
Usage
Package export"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
"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
| Prop | Type / description | Default |
|---|---|---|
children | ReactNodeComponent content and composition slots. | - |
className | stringAdditional 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.