Input Group

Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs.


Basic Example

Place one add-on or button on either side of an input. You may also place one on both sides of an input.

@
@example.com
$
.00
<div class="input-group mg-b-10">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon1">@</span>
  </div>
  <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
</div>

<div class="input-group mg-b-10">
  <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2">
  <div class="input-group-append">
    <span class="input-group-text" id="basic-addon2">@example.com</span>
  </div>
</div>

<div class="input-group">
  <div class="input-group-prepend">
    <span class="input-group-text">$</span>
  </div>
  <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
  <div class="input-group-append">
    <span class="input-group-text">.00</span>
  </div>
</div>

Checkboxes and Radios

Place any checkbox or radio option within an input group’s addon instead of text.

<div class="input-group">
  <div class="input-group-prepend">
    <div class="input-group-text">
      <div class="custom-control custom-checkbox pd-l-15">
        <input type="checkbox" class="custom-control-input" id="customCheck1">
        <label class="custom-control-label" for="customCheck1"></label>
      </div>
    </div>
  </div>
  <input type="text" class="form-control" aria-label="Text input with checkbox">
</div>

Multiple Inputs

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

Fullname
<div class="input-group">
  <div class="input-group-prepend">
    <span class="input-group-text">Fullname</span>
  </div>
  <input type="text" aria-label="First name" class="form-control" placeholder="Firstname">
  <input type="text" aria-label="Last name" class="form-control" placeholder="Lastname">
</div>

Multiple Addons

Multiple add-ons are supported and can be mixed with checkbox and radio input versions.

$ 0.00
$ 0.00
<div class="input-group">
  <div class="input-group-prepend">
    <span class="input-group-text">$</span>
    <span class="input-group-text">0.00</span>
  </div>
  <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)">
</div>

<div class="input-group">
  <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)">
  <div class="input-group-append">
    <span class="input-group-text">$</span>
    <span class="input-group-text">0.00</span>
  </div>
</div>

Button Addons

Place any buttons within an input group’s addon.

<div class="input-group">
  <div class="input-group-prepend">
    <button class="btn btn-outline-light" type="button" id="button-addon1">Button</button>
  </div>
  <input type="text" class="form-control" placeholder="" aria-label="Example text with button addon" aria-describedby="button-addon1">
</div>

<div class="input-group">
  <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="button-addon2">
  <div class="input-group-append">
    <button class="btn btn-outline-light" type="button" id="button-addon2">Button</button>
  </div>
</div>

Dropdown Addons

Place any dropdown within an input group’s addon.

<div class="input-group">
  <div class="input-group-prepend">
    <button class="btn btn-outline-light dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</button>
    <div class="dropdown-menu tx-13">
      <a class="dropdown-item" href="#">Action</a>
      <a class="dropdown-item" href="#">Another action</a>
      <a class="dropdown-item" href="#">Something else here</a>
      <div role="separator" class="dropdown-divider"></div>
      <a class="dropdown-item" href="#">Separated link</a>
    </div>
  </div>
  <input type="text" class="form-control" aria-label="Text input with dropdown button">
</div>