See all the pages Metrica.
Here are examples of .form-control applied to each textual HTML5 <input> type.
.form-control
<input>
type
Basic example to demonstrate Bootstrap’s form styles.
Be sure to use .col-form-label-sm or .col-form-label-lg to your <label>s or <legend>s to correctly follow the size of .form-control-lg and .form-control-sm.
.col-form-label-sm
.col-form-label-lg
<label>
<legend>
.form-control-lg
.form-control-sm
Custom stylr example.
Use the .form-inline class to display a series of labels, form controls, and buttons on a single horizontal row. Form controls within inline forms vary slightly from their default states..
.form-inline
Set heights using classes like .form-control-lg and .form-control-sm.
The file input is the most gnarly of the bunch and requires additional JavaScript if you’d like to hook them up with functional Choose file… and selected file name text.
Here’s lang(es) in action on the custom file input for a Spanish translation:
lang(es)
Create custom <input type="range"> controls with .custom-range.
<input type="range">
.custom-range
Set horizontally scrollable range inputs using .form-control-range.
.form-control-range
A switch has the markup of a custom checkbox but uses the .custom-switch class to render a toggle switch. Switches also support the disabled attribute.
.custom-switch
disabled
For even more customization and cross browser consistency, use our completely custom form elements to replace the browser defaults. They’re built on top of semantic and accessible markup, so they’re solid replacements for any default form control.
Our example forms show native textual <input>s above, but form validation styles are available for our custom form controls, too.
We recommend using client side validation, but in case you require server side, you can indicate invalid and valid form fields with .is-invalid and .is-valid. Note that .invalid-feedback is also supported with these classes.
.is-invalid
.is-valid
.invalid-feedback
Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs.
There are many variations of passages.
Project
Complete Tasks75%