Forms
Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms.
Form Input Type
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.
Input
Password
Textarea
Search
Url
Phone
Sizing
Select
Customize the native
<select>
s with custom CSS that changes the element’s initial appearance.
Default
You may also choose from small and large custom selects to match our similarly sized text inputs.
Sizing
Multiple Select
Checks and radios
Create consistent cross-browser and cross-device checkboxes and radios with our completely rewritten checks component.
Checks
Indeterminate
Disabled
Add the
disabled
attribute and the associated
<label>
s are automatically styled to match with a lighter color to help indicate the input’s state.
Switches
A switch has the markup of a custom checkbox but uses the
.form-switch
class to render a toggle switch. Consider using
role="switch"
to more accurately convey the nature of the control to assistive technologies that support this role. In older assistive technologies, it will simply be announced as a regular
checkbox as a fallback. Switches also support the
disabled
attribute.
Switches
Range
Use our custom range inputs for consistent cross-browser styling and built-in customization.
Example range
Disabled
Min and max
Steps
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
Button addons
Floating labels
Create beautifully simple form labels that float over your input fields.
Example
Textareas
Validation
Provide valuable, actionable feedback to your users with HTML5 form validation, via browser default behaviors or custom styles and JavaScript.