跳到主要内容

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.

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.

结果
Loading...
实时编辑器

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.

结果
Loading...
实时编辑器

Checkboxes and radios

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

结果
Loading...
实时编辑器

Multiple inputs

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

结果
Loading...
实时编辑器

Multiple addons

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

结果
Loading...
实时编辑器

Button addons

结果
Loading...
实时编辑器

Buttons with Dropdowns

结果
Loading...
实时编辑器

Segmented buttons

结果
Loading...
实时编辑器

API

InputGroup