Introduction Modules Flavors Customization Quick Reference  Github
Core Grid Navigation Input Control Table Card Tab Contextual Progress Utility

Input Control

The input_control module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.

All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.

Quick overview

The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The input_control module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.


Quick start

To customize the input_control module, duplicate an existing flavor file (we suggest you use the mini-default.scss flavor file) and use this page's variable tables and mixins as a reference to change only the values you need. Remember to compile your flavor file (not the module's partial file) using a Sass preprocessor (we highly recommend using sass-autocompile if you are working with Atom).


Forms & input

The input_control module's forms and input fields can be easily customized to use different sizes and colors, as well as different class names for groupping.


VariableTypeDescriptionSample value
$form-back-colorColor Background color for <form> elements#eeeeee
$form-fore-colorColor Text color for <form> elements$fore-color
$form-border-styleBorder Border style for <form> elements1px solid #bdbdbd
$form-border-radiusBorder radius Border radius for <form> elements2px
$form-marginMargin Margin for <form> elements8px
$form-paddingPadding Padding for <form> elements12px
$form-box-shadowBox shadow Box shadow for <form> elements0 1px 3px rgba(0,0,0, 0.1)
$fieldset-back-colorColor Background color for <fieldset> elements$form-back-color
$fieldset-border-styleBorder Border style for <fieldset> elements1px solid #bdbdbd
$fieldset-border-radiusBorder radius Border radius for <fieldset> elements2px
$fieldset-marginMargin Margin for <fieldset> elements2px
$fieldset-paddingPadding Padding for <fieldset> elements8px
$legend-fore-colorColor Text color for <legend> elements$form-fore-color
$legend-font-sizeFont size Font size for <legend> elements0.925em
$legend-font-weightFont weight Font weight for <legend> elements700
$legend-paddingPadding Padding for <legend> elements2px 4px
$label-paddingPadding Padding for <label> elements4px
$input-back-colorColor Background color for <input> elements#fafafa
$input-fore-colorColor Text color for <input> elements$fore-color
$input-border-styleBorder Border style for <input> elements1px solid #bdbdbd
$input-border-radiusBorder radius Border radius for <input> elements1px
$input-marginMargin Margin for <input> elements2px
$input-paddingPadding Padding for <input> elements8px 12px
$input-focus-border-colorColor Border color for <input> elements (focused)#0288d1
$input-invalid-border-colorColor Border color for <input> elements (invalid)#d32f2f
$input-readonly-border-colorColor Border color for <input> elements (readonly)#bdbdbd
$input-readonly-back-colorColor Background color for <input> elements (readonly)#e0e0e0
$input-placeholder-fore-colorColor Text color for placeholder text of <input> elements#616161
$input-disabled-opacityOpacity Opacity of <input> elements (disabled)0.75
$input-group-nameString Class name for input groups'input-group'
$include-fluid-input-groupLogical Enables fluid input groups1true
$input-group-fluid-nameString Class name for fluid input groups1'fluid'
$input-group-mobile-breakpointBreakpoint Breakpoint for fluid input groups on mobile devices1767px
$hide-file-inputsLogical Hides all <input type="file"> elements, allowing access only via the use of labelstrue

Notes:

  1. The values of $input-group-fluid-name and $input-group-mobile-breakpoint will only be used if $include-fluid-input-group is set to true.

Checkboxes & radio buttons

The navigation module's checkbox and radio button elements are based on custom rules and depend on the use of <label> elements and input groups to be stylized and properly displayed.


VariableTypeDescriptionSample value
$checkbox-sizeSize (single value, px preferred) The size of checkbox/radio elements (determines multiple values of the elements)16px
$checkbox-back-colorColor Background color for checkbox/radio elements$input-back-color
$checkbox-fore-colorColor Text color for checkbox/radio elements$input-fore-color
$checkbox-border-thicknessBorder width Border width for checkbox/radio elements1px
$checkbox-border-colorColor Border color for checkbox/radio elements#bdbdbd
$checkbox-border-radiusBorder radius Border radius for checkbox/radio elements2px
$checkbox-focus-border-colorColor Border color for checkbox/radio elements (focused)#0288d1
$checkbox-bottom-spacingPosition bottom (px preferred) Position bottom spacing for checkbox/radio elements6px
$checkbox-disabled-opacityOpacity Opacity for checkbox/radio elements (disabled)0.75

Notes:

  1. It is highly recommended to stick to one unit type for the definitions of checkbox/radio elements (our suggestion is px).

If you want to learn more about customizing mini.css, go back to the customization page or choose a module from the top menu to see its documentation.