All generic <strong>form controls</strong>, designed for consistency
</h2>
<hr>
<divclass="content">
<p>The following form controls <strong>classes</strong> are supported:</p>
<ul>
<li><code>.label</code></li>
<li><code>.input</code></li>
<li><code>.textarea</code></li>
<li><code>.select</code></li>
<li><code>.checkbox</code></li>
<li><code>.radio</code></li>
<li><code>.button</code></li>
<li><code>.help</code></li>
</ul>
<p>Each of them should be wrapped in a <code>.control</code> container.<br>
When combining several controls in a <strong>form</strong>, use the <code>.field</code> class as a <strong>container</strong>, to keep the spacing consistent.</p>
</div>
<divclass="columns">
<divclass="column is-half">
{{example}}
</div>
<divclass="column is-half">
{% highlight html %}{{example}}{% endhighlight %}
</div>
</div>
<hr>
<h3id="form-addons"class="title">Form field</h3>
<divclass="content">
<p>The <code>field</code> container is a simple container for:</p>
<ul>
<li>a text <code>label</code></li>
<li>a form <code>control</code></li>
<li>an optional <code>help</code>text</li>
</ul>
</div>
<divclass="columns">
<divclass="column is-half">
{{field_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{field_example}}{% endhighlight %}
</div>
</div>
<divclass="content">
<p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
</div>
<divclass="columns">
<divclass="column is-half">
{{fields_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{fields_example}}{% endhighlight %}
<p>The <code>control</code> is a versatile container meant to <strong>enhance single form controls</strong>. Because it has the same height as a control elements, it can <strongclass="has-text-danger">only contain</strong> the following elements:</p>
<p>You can append one of 2 <strong>modifiers</strong> on a control:</p>
<ul>
<li>
<code>has-icons-left</code>
</li>
<li>
and/or <code>has-icons-right</code>
</li>
</ul>
<p>You also need to add a modifier on the <strong>icon</strong>:</p>
<ul>
<li>
<code>icon is-left</code> if <code>has-icons-left</code> is used
</li>
<li>
<code>icon is-right</code> if <code>has-icons-right</code> is used
</li>
</ul>
<p>The size of the <strong>input</strong> will define the size of the icon container.</p>
</div>
<divclass="columns">
<divclass="column is-half">
{{icons_example}}
</div>
<divclass="column is-half highlight-full">
{% highlight html %}{{icons_example}}{% endhighlight %}
</div>
</div>
<divclass="columns">
<divclass="column is-half">
<divclass="content">
<p>
You can append icons to <strong>select dropdowns</strong> as well.
</p>
</div>
{{select_icons_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{select_icons_example}}{% endhighlight %}
</div>
</div>
<divclass="columns">
<divclass="column is-half">
<divclass="content">
<p>
If the control contains an icon, Bulma will make sure the icon remains <strong>centered</strong>, no matter the size of the input <em>or</em> of the icon.
</p>
</div>
{{has_icons_small_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{has_icons_small_example}}{% endhighlight %}
</div>
</div>
<divclass="columns">
<divclass="column is-half">
{{has_icons_normal_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{has_icons_normal_example}}{% endhighlight %}
</div>
</div>
<divclass="columns">
<divclass="column is-half">
{{has_icons_medium_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{has_icons_medium_example}}{% endhighlight %}
</div>
</div>
<divclass="columns">
<divclass="column is-half">
{{has_icons_large_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{has_icons_large_example}}{% endhighlight %}
<p>If you want a full width select dropdown, pair <code>control is-expanded</code> with <code>select is-fullwidth</code>.</p>
</div>
<divclass="example">
{{addons_expanded_fullwidth_example}}
</div>
{% highlight html %}{{addons_expanded_fullwidth_example}}{% endhighlight %}
<divclass="content">
<p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifers to alter the <strong>alignment</strong>.</p>
</div>
<divclass="example">
{{addons_center_example}}
</div>
{% highlight html %}{{addons_center_example}}{% endhighlight %}
<divclass="example">
{{addons_right_example}}
</div>
{% highlight html %}{{addons_right_example}}{% endhighlight %}
<hr>
<h3class="title">Form group</h3>
<divclass="content">
<p>
If you want to <strong>group</strong> controls together, use the <code>is-grouped</code> modifier on the <code>field</code> container.
<br>
Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifers to alter the <strong>alignment</strong>.
</p>
<p>
Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong> with.
</p>
</div>
<divclass="example">
{{group_example}}
</div>
{% highlight html %}{{group_example}}{% endhighlight %}
<hr>
<h3class="title">Horizontal form</h3>
<divclass="content">
<p>If you want a <strong>horizontal</strong> form control, use the <code>is-horizontal</code> modifier on the <code>field</code> container, in which you include:</p>
<ul>
<li>
<code>field-label</code> for the side label
</li>
<li>
<code>field-body</code> for the input/select/textarea container
</li>
</ul>
<p>You can use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
</div>
<divclass="example">
{{horizontal_form_example}}
</div>
{% highlight html %}{{horizontal_form_example}}{% endhighlight %}
<divclass="content">
<p>
To preserve the <strong>vertical alignment</strong> of labels with each type and size of control, the <code>.field-label</code> comes with <strong>4 size modifiers</strong>:
</p>
<ul>
<li>
<code>.is-small</code>
</li>
<li>
<code>.is-normal</code> for any <code>.input</code> or <code>.button</code>
</li>
<li>
<code>.is-medium</code>
</li>
<li>
<code>.is-large</code>
</li>
</ul>
</div>
<divclass="example">
{{field_label_example}}
</div>
{% highlight html %}{{field_label_example}}{% endhighlight %}