Responsive Element
Grouped fields automatically receive responsive styling, swapping to one field per row for mobile.
--- layout : 'default' css : 'form' title : 'Form' description : 'A form is a collection of user input elements' type : 'UI Collection' --- <%- @partial('header') %>
Forms always include fields, and fields always contain form elements. Fields themselves may also include: inputs, standard form fields, labels, selection dropdowns, textareas, as well as: checkboxes, and message blocks.
Validation messages use messages which are formatted for use inside forms.
A field is a form element containing a label and an input
A textarea uses the default form element
UI Checkboxes allow a user to select individual options in a form
Using checkboxes with HTML only, you must match the for
attribute of your label to the id
attribute of your checkbox.
Radio boxes are a type of UI Checkboxes allowing only exclusive choice of options
Using checkboxes with HTML only, you must match the for
attribute of your label to the id
attribute of your checkbox.
A selection dropdown, a type of ui dropdown can be used to allow for a selection from multiple choices
Text blocks have special meaning inside a form tag. Any info, error, or warning message blocks found inside a form are hidden by default.
If a form is in loading state, it will automatically show a loading indicator:
If a form is in an error state, it will automatically show any error message blocks:
If a form is in warning state, it will automatically show any warning message block:
Individual fields may contain an error state
Individual fields may be disabled or read only
A form can take the width of its container
A form can also be small or large
A form on a dark background may have to invert its color scheme
A field can have its label next to instead of above it.
A field can let users know they are for dates
Fields can exist together side by side
Fields can be grouped to show related choices
Multiple fields may be inline in a row