Forms - Input Groups
Extend form controls by adding text or buttons before, after, or on both sides of any text-based <input>
. Use .input-group
with an .input-group-addon
to prepend or append elements to a single .form-control
. Place one add-on or button on either side of an input. You may also place one on both sides of an input. Multiple add-ons on a single side and multiple form-controls in a single input group aren't supported.
Optional buttons as addons. Buttons in input groups are a bit different and require one extra level of nesting. Instead of .input-group-addon
, you'll need to use .input-group-btn
to wrap the buttons. Input group buttons support all available button options except sizing - all buttons height will be adjusted automatically according to the input group size.
Besides default addon options, input groups support different variations of checkboxes, radio buttons, switches, contextual validation state options, icons in different positions. All colors can be easily changed in LESS variables, options and positions also can be mixed. However avoid using <select>
elements here as they cannot be fully styled in WebKit browsers and <textarea>
elements here as their rows attribute will not be respected in some cases.