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">
{{form_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{form_example}}{% endhighlight %}
</div>
</div>
<hr>
<h3class="title">Colors</h3>
<divclass="columns">
<divclass="column is-half">
{{colors_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{colors_example}}{% endhighlight %}
</div>
</div>
<hr>
<h3class="title">Sizes</h3>
<divclass="columns">
<divclass="column is-half">
{{sizes_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{sizes_example}}{% endhighlight %}
</div>
</div>
<hr>
<h3class="title">States</h3>
<h4class="subtitle">Normal</h4>
<divclass="columns">
<divclass="column is-half">
{{normal_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{normal_example}}{% endhighlight %}
</div>
</div>
<h4class="subtitle">Hover</h4>
<divclass="columns">
<divclass="column is-half">
{{hover_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{hover_example}}{% endhighlight %}
</div>
</div>
<h4class="subtitle">Focus</h4>
<divclass="columns">
<divclass="column is-half">
{{focus_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{focus_example}}{% endhighlight %}
</div>
</div>
<h4class="subtitle">Loading</h4>
<divclass="columns">
<divclass="column is-half">
{{loading_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{loading_example}}{% endhighlight %}
</div>
</div>
{% if site.vernum >= 43 %}
<divclass="columns">
<divclass="column is-half">
<pstyle="margin-bottom: 0.5rem;">
<spanclass="tag is-success">New!</span>
<spanclass="tag is-info">0.4.3</span>
</p>
<divclass="content">
<p>
You can resize the loading spinner by appending <code>is-small</code>, <code>is-medium</code> or <code>is-large</code> to the <code>control</code> container.
</p>
</div>
{{loading_sizes_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
</div>
</div>
{% endif %}
<h4class="subtitle">Disabled</h4>
<divclass="columns">
<divclass="column is-half">
{{disabled_example}}
</div>
<divclass="column is-half">
{% highlight html %}{{disabled_example}}{% endhighlight %}
</div>
</div>
<!-- Font Awesome Icons -->
<hr>
<h3class="title">With icons</h3>
<divclass="content">
<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 html %}{{icons_example}}{% endhighlight %}
</div>
</div>
<divclass="columns">
<divclass="column is-half">
<divclass="content">
<p>
<spanclass="tag is-success">New!</span>
<spanclass="tag is-info">0.4.2</span>
</p>
<p>
You can now 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="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>
<divclass="columns">
<divclass="column is-half">
{{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 %}
</div>
</div>
<hr>
<h3id="form-addons"class="title">Form addons</h3>
<divclass="content">
<p>If you want to <strong>attach</strong> controls together, use the <code>has-addons</code> modifier on the <code>control</code> container:</p>
</div>
<divclass="example">
{{addons_example}}
</div>
{% highlight html %}{{addons_example}}{% endhighlight %}
<divclass="content">
<p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
</div>
<divclass="content">
<p>
<spanclass="tag is-success">New!</span>
<spanclass="tag is-info">0.4.2</span>
</p>
<p>It can be useful to append a <ahref="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
</div>
<divclass="example">
{{addons_static_example}}
</div>
{% highlight html %}{{addons_static_example}}{% endhighlight %}
<divclass="content">
<p>Use the <code>is-expanded</code> modifier on the element you want to fill up the remaining space (in this case, the input):</p>
</div>
<divclass="example">
{{addons_expanded_example}}
</div>
{% highlight html %}{{addons_expanded_example}}{% endhighlight %}
<divclass="content">
<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>control</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>.
</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 of course 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>
<spanclass="tag is-success">New!</span>
</p>
<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 %}