--- title: Input layout: documentation doc-tab: form doc-subtab: input variables: - name: $input-color value: $grey-darker - name: $input-background-color value: $white - name: $input-border-color value: $grey-lighter - name: $input-shadow value: inset 0 1px 2px rgba($black, 0.1) - name: $input-hover-color value: $grey-darker - name: $input-hover-border-color value: $grey-light - name: $input-focus-color value: $grey-darker - name: $input-focus-border-color value: $link - name: $input-disabled-color value: $text-light - name: $input-disabled-background-color value: $background - name: $input-disabled-border-color value: $background - name: $input-arrow value: $link - name: $input-icon-color value: $grey-lighter - name: $input-icon-active-color value: $grey - name: $input-radius value: $radius --- {% capture input_example %} {% endcapture %} {% capture colors_example %}
{% endcapture %} {% capture sizes_example %}
{% endcapture %} {% capture normal_example %}
{% endcapture %} {% capture hover_example %}
{% endcapture %} {% capture focus_example %}
{% endcapture %} {% capture loading_example %}
{% endcapture %} {% capture loading_sizes_example %}
{% endcapture %} {% capture disabled_example %}
{% endcapture %} {% capture 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 %} {% include subnav-form.html %}

Input

The text input and its variations

{% include meta.html colors=true sizes=true variables=true %}

The following modifiers are supported:

The following type attributes are supported:

  • type="text"
  • type="password"
  • type="email"
  • type="tel"
{{input_example}}
{% highlight html %}{{input_example}}{% endhighlight %}
{% include anchor.html name="Colors" %}
{{colors_example}}
{% highlight html %}{{colors_example}}{% endhighlight %}
{% include anchor.html name="Sizes" %}
{{sizes_example}}
{% highlight html %}{{sizes_example}}{% endhighlight %}

States

Normal

{{normal_example}}
{% highlight html %}{{normal_example}}{% endhighlight %}

Hover

{{hover_example}}
{% highlight html %}{{hover_example}}{% endhighlight %}

Focus

{{focus_example}}
{% highlight html %}{{focus_example}}{% endhighlight %}

Loading

{{loading_example}}
{% highlight html %}{{loading_example}}{% endhighlight %}
{% if site.vernum >= 43 %}

New! 0.4.3

You can resize the loading spinner by appending is-small, is-medium or is-large to the control container.

{{loading_sizes_example}}
{% highlight html %}{{loading_sizes_example}}{% endhighlight %}
{% endif %}

Disabled

{{disabled_example}}
{% highlight html %}{{disabled_example}}{% endhighlight %}

With icons

You can append one of 2 modifiers on a control:

  • has-icons-left
  • and/or has-icons-right

You also need to add a modifier on the icon:

  • icon is-left if has-icons-left is used
  • icon is-right if has-icons-right is used

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

{{icons_example}}
{% highlight html %}{{icons_example}}{% endhighlight %}

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.

{{has_icons_small_example}}
{% highlight html %}{{has_icons_small_example}}{% endhighlight %}
{{has_icons_normal_example}}
{% highlight html %}{{has_icons_normal_example}}{% endhighlight %}
{{has_icons_medium_example}}
{% highlight html %}{{has_icons_medium_example}}{% endhighlight %}
{{has_icons_large_example}}
{% highlight html %}{{has_icons_large_example}}{% endhighlight %}
{% include variables.html element=true %}