InputGroup

Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place <label>s outside the input group.

Sizing

Add the relative form sizing classes to the InputGroup and contents within will automatically resize—no need for repeating the form control size classes on each element.

Checkboxes and radios

Use the InputGroup.Radio or InputGroup.Checkbox to add options to an input group.

Multiple inputs

While multiple inputs are supported visually, validation styles are only available for input groups with a single input.

Multiple addons

Multiple add-ons are supported and can be mixed

Button addons

Buttons with Dropdowns

API

InputGroup

import InputGroup from 'react-bootstrap/InputGroup'Copy import code for the InputGroup component
Name Type Default Description
as
elementType
<div>

You can use a custom element type for this component.

hasValidation
boolean

Handles the input's rounded corners when using form validation.

Use this when your input group contains both an input and feedback element.

size
'sm' | 'lg'

Control the size of buttons and form elements from the top-level.

bsPrefix
string
'input-group'

Change the underlying component CSS base class name and modifier class names prefix. This is an escape hatch for working with heavily customized bootstrap css.

© 2014–present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff
Licensed under the MIT License (MIT).
https://react-bootstrap.github.io/components/input-group/