--- layout: documentation doc-tab: elements doc-subtab: form --- {% include subnav-elements.html %}

Form controls

All generic form controls, designed for consistency


The following form controls classes are supported:

  • .label
  • .input
  • .textarea
  • .select
  • .checkbox
  • .radio
  • .button
  • .help

When combining several controls in a form, use the .control class as a container, to keep the spacing consistent.

This username is available

This email is invalid

{% highlight html %}

This username is available

This email is invalid

{% endhighlight %}

Colors

{% highlight html %}

{% endhighlight %}

Sizes

{% highlight html %}

{% endhighlight %}

States

Loading

{% highlight html %}

{% endhighlight %}

Disabled

{% highlight html %}

{% endhighlight %}

With Font Awesome icons

{% highlight html %}

{% endhighlight %}

{% highlight html %}

{% endhighlight %}

Form addons

If you want to attach controls together, use the has-addons modifier on the control container:

{% highlight html %}

Search

{% endhighlight %}

You can attach inputs, buttons, and dropdowns only.

Use the is-expanded modifier on the element you want to fill up the remaing space (in this case, the input):

Transfer

{% highlight html %}

Transfer

{% endhighlight %}

Use the has-addons-centered or the has-addons-right modifers to alter the alignment.

Transfer

{% highlight html %}

Transfer

{% endhighlight %}

Transfer

{% highlight html %}

Transfer

{% endhighlight %}

Form group

If you want to group controls together, use the is-grouped modifier on the control container:

{% highlight html %} {% endhighlight %}

Add the is-expanded modifier on the control element you want to fill up the remaining space.


Horizontal form

If you want a horizontal form control, use the is-horizontal modifier on the control container, in which you include:

  • control-label for the side label
  • control for the input/select/textarea container

You can of course use is-grouped or has-addons for the child elements.

{% highlight html %}

{% endhighlight %}