Individual form controls automatically receive some global styling.
All textual <input>
, <textarea>
, and
<select>
elements with .form-control
are set to
width: 100%;
by default. Wrap labels and controls in
.form-group
for optimum spacing.
Use Bootstrap's predefined grid classes to align labels and groups of form controls in a
horizontal layout by adding .form-horizontal
to the form. Doing so changes
.form-group
s to behave as grid rows, so no need for .row
.
Add .form-inline
to your <form>
for left-aligned and
inline-block controls.
Show your text field as a line, adding the class .underline
Create taller or shorter form controls that match button sizes.
<fieldset>
is used as a wrapper right inside the form element. Right after you define
a fieldset, you can include a legend title by using <legend>
. Here's some HTML to
help make copy paste.
Add the disabled
boolean attribute on an input to prevent user input.
Add the readonly
boolean attribute on an input to prevent user input.
An asterisk indicates to the user that the field is required.
Includes validation styles for success states on form controls.
Includes validation styles for warning states on form controls.
Includes validation styles for error states on form controls.
Checkboxes are for selecting one or several options in a list
Use the .checkbox-inline
classes on a series of checkboxes for controls
that appear on the same line.
Turn checkboxes in toggle switches.
Turn checkboxes in buttons.
{{checkModel}}
Radios are for selecting one option from many.
Use the .radio-inline
classes on a series of radios for controls that
appear on the same line.
Turn radio in buttons.
{{radioModel || 'null'}}
uiMask Directive allows users to enter the data in a certain format (dates, phone numbers, etc).
The <textarea>
tag defines a multi-line text input control.
A clean, flexible, and fully customizable date picker. User can navigate through months and years. The datepicker shows dates that come from other than the main month being displayed. These other dates are also selectable.
Selected date is: {{dt | date:'MM/dd/yyyy h:mma' }}
Time is: {{dt | date:'shortTime' }}
The <select>
element is used to create a drop-down list.
AngularJS-native version of Select2 and Selectize.
A mobile and touch friendly input spinner component for Bootstrap. It supports the mousewheel and the up/down keys.
The init value is set on the input with the value
attribute.
Use the data-postfix
attribute to add a postfix.
Use the data-prefix
attribute to add a prefix.
Set the data-verticalbuttons
attribute as true
.
You can also specify the class for icons.
Set the data-postfix
attribute as button
.
You can also specify the class for the button.
Size of the whole controller can be set with applying input-sm or input-lg class on the input