--- title: Form controls layout: documentation doc-tab: form doc-subtab: general breadcrumb: - home - documentation - form - form-general variables_control_keys: - $control-radius - $control-radius-small - $control-padding-vertical - $control-padding-horizontal variables_keys: - $label-color - $label-weight - $help-size --- {% capture example %}

This username is available

This email is invalid

{% endcapture %} {% capture field_example %}

This is a help text

{% endcapture %} {% capture fields_example %}
{% endcapture %} {% capture control_input_example %}
{% endcapture %} {% capture control_select_example %}
{% endcapture %} {% capture control_button_example %}
{% endcapture %} {% capture icons_example %}

{% endcapture %} {% capture select_icons_example %}

{% endcapture %} {% capture has_icons_small_example %}
{% endcapture %} {% capture has_icons_normal_example %}
{% endcapture %} {% capture has_icons_medium_example %}
{% endcapture %} {% capture has_icons_large_example %}
{% endcapture %} {% capture addons_example %}
Search
{% endcapture %} {% capture addons_static_example %}

@gmail.com

{% endcapture %} {% capture addons_expanded_example %}

Transfer

Transfer

{% endcapture %} {% capture addons_expanded_fullwidth_example %}
{% endcapture %} {% capture addons_center_example %}

Transfer

{% endcapture %} {% capture addons_right_example %}

Transfer

{% endcapture %} {% capture group_example %}

Submit

Cancel

{% endcapture %} {% capture group_centered_example %}

Submit

Cancel

{% endcapture %} {% capture group_right_example %}

Submit

Cancel

{% endcapture %} {% capture group_expanded_example %}

Search

{% endcapture %} {% capture group_multiline_example %}

One

Two

Three

Four

Five

Size

Seven

Eight

Nine

Ten

Eleven

Twelve

Thirteen

{% endcapture %} {% capture horizontal_form_example %}

Do not enter the first zero

This field is required

{% endcapture %} {% capture field_label_example %}
{% endcapture %} {% capture disabled_fields_example %}
{{ fields_example }}
{% endcapture %}

The following form controls classes are supported:

Each of them should be wrapped in a .control container.
When combining several controls in a form, use the .field class as a container, to keep the spacing consistent.

{% include elements/snippet.html content=example more=true %} {% include elements/anchor.html name="Form field" %}

The field container is a simple container for:

{% include elements/snippet.html content=field_example %}

This container allows form fields to be spaced consistently.

{% include elements/snippet.html content=fields_example %} {% include elements/anchor.html name="Form control" %}

The control is a versatile container meant to enhance single form controls. Because it has the same height as a control elements, it can only contain the following elements:

{% include elements/snippet.html content=control_input_example %} {% include elements/snippet.html content=control_select_example %} {% include elements/snippet.html content=control_button_example %} {% include elements/anchor.html name="With icons" %}

You can append one of 2 modifiers on a control:

You also need to add a modifier on the icon:

The size of the input will define the size of the icon container.

{% include elements/snippet.html content=icons_example clipped=true %}

You can append icons to select dropdowns as well.

{% include elements/snippet.html content=select_icons_example %}

If the control contains an icon, Bulma will make sure the icon remains centered, no matter the size of the input or of the icon.

{% include elements/snippet.html content=has_icons_small_example %} {% include elements/snippet.html content=has_icons_normal_example clipped=true %} {% include elements/snippet.html content=has_icons_medium_example clipped=true %} {% include elements/snippet.html content=has_icons_large_example clipped=true %} {% include elements/anchor.html name="Form addons" %}

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

{% include elements/snippet.html content=addons_example %}

You can attach inputs, buttons, and dropdowns only.

It can be useful to append a static button.

{% include elements/snippet.html content=addons_static_example %}

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

{% include elements/snippet.html content=addons_expanded_example horizontal=true more=true %}

If you want a full width select dropdown, pair control is-expanded with select is-fullwidth.

{% include elements/snippet.html content=addons_expanded_fullwidth_example %}

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

{% include elements/snippet.html content=addons_center_example %} {% include elements/snippet.html content=addons_right_example %} {% include elements/anchor.html name="Form group" %}

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

{% include elements/snippet.html content=group_example %}
Use the is-grouped-centered or the is-grouped-right modifiers to alter the alignment.

{% include elements/snippet.html content=group_centered_example %} {% include elements/snippet.html content=group_right_example %}

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

{% include elements/snippet.html content=group_expanded_example %}

Add the is-grouped-multiline modifier to allow controls to fill up multiple lines. This is ideal for a long list of controls.

{% include elements/snippet.html content=group_multiline_example clipped=true %}

List of buttons

If you only need a list of buttons, try out the new buttons class with which you can create a multiline list of buttons.

{% include elements/anchor.html name="Horizontal form" %}

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

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

{% include elements/snippet.html content=horizontal_form_example horizontal=true more=true %}

To preserve the vertical alignment of labels with each type and size of control, the .field-label comes with 4 size modifiers:

{% include elements/snippet.html content=field_label_example horizontal=true more=true %} {% capture custom_message %} Form elements can be customized using the following generic variables. Simply set one or multiple of these variables before importing Bulma. Learn how. {% endcapture %} {% include elements/anchor.html name="Disabled form" %} {% include elements/new-tag.html version="0.7.4" %}

You can disable part or a whole form by wrapping a set of controls in a fieldset with a disabled HTML attribute.

{% include elements/snippet.html content=disabled_fields_example %} {% include elements/variables.html type='element' variables_keys=page.variables_control_keys custom_message=custom_message folder='utilities' file='controls' %} {% include elements/variables.html type='element' variables_keys=page.variables_keys folder='elements' file='form' hide_anchor=true hide_content=true %}