Introducing PrimeReact v11-alpha 🎉Discover Now

InputGroup

InputGroup displays text, icon, buttons and other content can be grouped next to an input.

https://
.com
preview

Installation#

npx shadcn@latest add @primereact/inputgroup

Usage#

import { InputGroup, InputGroupAddon } from '@/components/ui/inputgroup';
<InputGroup>
    <InputGroupAddon>
        <i className="pi pi-user" />
    </InputGroupAddon>
    <InputText placeholder="Username" />
</InputGroup>

Examples#

Basic#

Combines an input with addons such as buttons or text labels.

www
basic-demo

Multiple#

A group is created by wrapping the input and add-ons with the InputGroup component. Each add-on element is defined as a child of InputGroupAddon component. Multiple add-ons can be placed inside the same group.

$
.00
multiple-demo

Button#

Buttons can be placed at either side of an input element.

8 results
button-demo

Checkbox & Radio#

Checkbox and RadioButton components can be combined with an input element under the same group.

checkbox-radio-demo

Select#

A Select component can be used within an InputGroup alongside other add-ons and inputs.

www
select-demo

Accessibility#

Screen Reader#

InputGroup and InputGroupAddon do not require any roles and attributes.

Keyboard Support#

Component does not include any interactive elements.