--- title: Bulma Sass Form Control Mixins layout: docs theme: sass doc-tab: sass doc-subtab: form-control-mixins breadcrumb: - home - documentation - sass - sass-form-control-mixins ---

In Bulma, the form controls are an essential part of the framework. They comprise the following elements:

The control() mixin ensures consistency by providing a set of styles that are shared between all these form controls. You can use it to create additional controls:

{% highlight sass %}@use "bulma/sass/utilities/controls"; .bulma-control-mixin { @include controls.control; background: deeppink; color: white; }{% endhighlight %} {% capture control-mixin %} {% endcapture %} {% include docs/elements/snippet.html content=control-mixin %} {% include docs/elements/anchor.html name="Sizes" %}

Controls have a default font size of $size-normal and also come in 3 additional sizes, which can be accessed via 3 additional mixins:

{% highlight sass %}.bulma-control-mixin { &.is-small { @include controls.control-small; } &.is-medium { @include controls.control-medium; } &.is-large { @include controls.control-large; } }{% endhighlight %} {% capture control-mixin-sizes %} {% endcapture %} {% include docs/elements/snippet.html content=control-mixin-sizes %} {% include docs/elements/anchor.html name="Control placeholder" %}

The control() mixin also exists as Sass placeholder %control

{% highlight sass %}@use "bulma/sass/utilities/extends"; .bulma-control-extend { @extend %control; background: mediumblue; color: white; }{% endhighlight %} {% capture control-extend %} {% endcapture %} {% include docs/elements/snippet.html content=control-extend %}