close

# Input Groups

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. Remember to place `<label>`s outside the input group.

@
@example.com
Your vanity URL
https://example.com/users/
$ .00
@
With textarea

    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">@</span>
        <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
    </div>

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

    <label for="basic-url" class="form-label">Your vanity URL</label>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon3">https://example.com/users/</span>
        <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3">
    </div>

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

    <div class="input-group mb-3">
        <input type="text" class="form-control" placeholder="Username" aria-label="Username">
        <span class="input-group-text">@</span>
        <input type="text" class="form-control" placeholder="Server" aria-label="Server">
    </div>

    <div class="input-group">
        <span class="input-group-text">With textarea</span>
        <textarea class="form-control" aria-label="With textarea"></textarea>
    </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 mb-3">
        <span class="input-group-text">$</span>
        <span class="input-group-text">0.00</span>
        <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)">
        <span class="input-group-text">$</span>
        <span class="input-group-text">0.00</span>
    </div>

##### Custom Styles

Easily match custom field styles with groups.

@
@example.com
Your vanity URL
https://example.com/users/
$ .00

    <div class="input-group mb-3">
        <span class="input-group-text input-group-text-solid-bordered" id="custom-addon1">@</span>
        <input type="text" class="form-control form-control-solid-bordered" placeholder="Username" aria-label="Username" aria-describedby="custom-addon1">
    </div>

    <div class="input-group mb-3">
        <input type="text" class="form-control form-control-solid" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="custom-addon2">
        <span class="input-group-text input-group-text-solid" id="custom-addon2">@example.com</span>
    </div>

    <label for="basic-url" class="form-label">Your vanity URL</label>
    <div class="input-group mb-3">
        <span class="input-group-text input-group-text-material" id="custom-addon3">https://example.com/users/</span>
        <input type="text" class="form-control form-control-material" id="custom-url" aria-describedby="custom-addon3">
    </div>

    <div class="input-group mb-3">
        <span class="input-group-text input-group-text-transparent">$</span>
        <input type="text" class="form-control form-control-transparent" aria-label="Amount (to the nearest dollar)"  placeholder="Enter amount">
        <span class="input-group-text input-group-text-transparent">.00</span>
    </div>

##### Checkboxes and radios

Place any checkbox or radio option within an input group’s addon instead of text. We recommend adding `.mt-0` to the `.form-check-input` when there’s no visible text next to the input.

    <div class="input-group mb-3">
        <div class="input-group-text">
            <input class="form-check-input mt-0" type="checkbox" value="" aria-label="Checkbox for following text input">
        </div>
        <input type="text" class="form-control" aria-label="Text input with checkbox">
    </div>

    <div class="input-group">
        <div class="input-group-text">
            <input class="form-check-input mt-0" type="radio" value="" aria-label="Radio button for following text input">
        </div>
        <input type="text" class="form-control" aria-label="Text input with radio button">
    </div>