Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms.
Textual form controls—like <input>s,
<select>s, and <textarea>s—are styled with the
.form-control class. Included are styles for general appearance, focus state, sizing,
and more.
Set heights using classes like .form-control-lg and .form-control-sm.
You may also choose from small and large custom selects to match our similarly sized text inputs.
It provides valuable, actionable feedback to your users with HTML5 form validation.
Use readonly or disabled attributes for
.form-control
Create custom <input
type="range"> controls with .custom-range. The
track (the background) and thumb (the value) are both styled to appear the same across browsers.
As only IE
and Firefox support “filling” their track from the left or right of the thumb as a means to
visually indicate progress, we do not currently support it.
Range inputs have implicit values for min and max—0 and 100,
respectively. You may specify new values for those using the min and
max attributes.
By default, range inputs “snap” to integer values. To change this, you can specify a step value. In the example below, we double the number of steps
by using step="0.5".