Form
On this page
# Intro
Form elements are classless by default and take up the full width of the parent element.
# Layout
Form layouts are controlled by the responsive grid system. row
and column
classes can be used to make horizontal or vertical forms.
Inline forms must use the -inline
modifier to display the proper margins.
# Colors
Inputs have color modifiers available with -primary
, -success
, -warning
, -danger
, -dark
, and -light
. The -light
modifier should only be used in the dark theme or inside darker elements.
# Readonly
Inputs can be set to readonly. Just add the readonly
attribute.
# Disabled
Inputs can be disabled. Just add the disabled
attribute.
# Sizing
Inputs can be sized using the -small
, -normal
, -medium
, and -large
modifiers.
# Shape
You can change the shape of inputs by using the border radius utility.
# Fieldset
Fieldsets can be used to group inputs and other elements together. To add a header to the fieldset, use a legend
element. The grid system should be used inside of a fieldset.
# Dates
Date pickers are classless and use the browsers built-in picker.
# Color Picker
Color pickers are classless and use the browsers built-in picker.
# Checkbox
Checkboxes are created by placing the input along with a toggle
classed inline element inside a label
with the checkbox
class. You can change the color of checkboxes by using the -primary
, -success
, -warning
, -danger
, -dark
, and -light
modifiers on the label
element.
# Radio
Radios are created by placing the input along with a toggle
classed inline element inside a label
with the radio
class. You can change the color of radios by using the -primary
, -success
, -warning
, -danger
, -dark
, and -light
modifiers on the label
element.
# Switch
Switches are created by placing the checkbox or radio input along with a toggle
classed inline element inside a label
with the switch
class. You can change the color of switches by using the -primary
, -success
, -warning
, -danger
, -dark
, and -light
modifiers on the label
element.
# Groups
You can group together inputs and buttons by wrapping them in a inputs
container. Elements will have their left and right margins removed. The addon
class can be applied to buttons to match the styling of inputs.