Documentation

Everything you need to create a website with Bulma

Form controls

All generic form controls, designed for consistency


The following form controls classes are supported:

  • .label
  • .input
  • .textarea
  • .select
  • .checkbox
  • .radio
  • .button
  • .help

When combining several controls in a form, use the .control class as a container, to keep the spacing consistent.

This username is available

This email is invalid

<label class="label">Name</label>
<p class="control">
  <input class="input" type="text" placeholder="Text input">
</p>
<label class="label">Username</label>
<p class="control has-icon has-icon-right">
  <input class="input is-success" type="text" placeholder="Text input" value="bulma">
  <span class="icon is-small">
    <i class="fa fa-check"></i>
  </span>
  <span class="help is-success">This username is available</span>
</p>
<label class="label">Email</label>
<p class="control has-icon has-icon-right">
  <input class="input is-danger" type="text" placeholder="Email input" value="hello@">
  <span class="icon is-small">
    <i class="fa fa-warning"></i>
  </span>
  <span class="help is-danger">This email is invalid</span>
</p>
<label class="label">Subject</label>
<p class="control">
  <span class="select">
    <select>
      <option>Select dropdown</option>
      <option>With options</option>
    </select>
  </span>
</p>
<label class="label">Message</label>
<p class="control">
  <textarea class="textarea" placeholder="Textarea"></textarea>
</p>
<p class="control">
  <label class="checkbox">
    <input type="checkbox">
    Remember me
  </label>
</p>
<p class="control">
  <label class="radio">
    <input type="radio" name="question">
    Yes
  </label>
  <label class="radio">
    <input type="radio" name="question">
    No
  </label>
</p>
<div class="control is-grouped">
  <p class="control">
    <button class="button is-primary">Submit</button>
  </p>
  <p class="control">
    <button class="button is-link">Cancel</button>
  </p>
</div>

Colors

<p class="control">
  <input class="input is-primary" type="text" placeholder="Primary input">
</p>
<p class="control">
  <input class="input is-info" type="text" placeholder="Info input">
</p>
<p class="control">
  <input class="input is-success" type="text" placeholder="Success input">
</p>
<p class="control">
  <input class="input is-warning" type="text" placeholder="Warning input">
</p>
<p class="control">
  <input class="input is-danger" type="text" placeholder="Danger input">
</p>

Sizes

<p class="control">
  <input class="input is-small" type="text" placeholder="Small input">
</p>
<p class="control">
  <input class="input" type="text" placeholder="Normal input">
</p>
<p class="control">
  <input class="input is-medium" type="text" placeholder="Medium input">
</p>
<p class="control">
  <input class="input is-large" type="text" placeholder="Large input">
</p>
<p class="control">
  <span class="select is-small">
    <select>
      <option>Select dropdown</option>
      <option>With options</option>
    </select>
  </span>
</p>
<p class="control">
  <span class="select">
    <select>
      <option>Select dropdown</option>
      <option>With options</option>
    </select>
  </span>
</p>
<p class="control">
  <span class="select is-medium">
    <select>
      <option>Select dropdown</option>
      <option>With options</option>
    </select>
  </span>
</p>
<p class="control">
  <span class="select is-large">
    <select>
      <option>Select dropdown</option>
      <option>With options</option>
    </select>
  </span>
</p>

States

Normal

<p class="control">
  <input class="input" type="text" placeholder="Normal input">
</p>
<p class="control">
  <textarea class="textarea" placeholder="Normal textarea"></textarea>
</p>

Hover

<p class="control">
  <input class="input is-hovered" type="text" placeholder="Hovered input">
</p>
<p class="control">
  <textarea class="textarea is-hovered" placeholder="Hovered textarea"></textarea>
</p>

Focus

<p class="control">
  <input class="input is-focused" type="text" placeholder="Focused input">
</p>
<p class="control">
  <textarea class="textarea is-focused" placeholder="Focused textarea"></textarea>
</p>

Loading

<p class="control is-loading">
  <input class="input" type="text" placeholder="Loading input">
</p>
<p class="control is-loading">
  <textarea class="textarea" placeholder="Loading textarea"></textarea>
</p>

Disabled

<p class="control">
  <input class="input" type="text" placeholder="Disabled input" disabled>
</p>
<p class="control">
  <textarea class="textarea" placeholder="Disabled textarea" disabled></textarea>
</p>
<p class="control">
  <label class="checkbox is-disabled">
    <input type="checkbox" disabled>
    Remember me
  </label>
</p>
<p class="control">
  <label class="radio is-disabled">
    <input type="radio" name="question" disabled>
    Yes
  </label>
  <label class="radio is-disabled">
    <input type="radio" name="question" disabled>
    No
  </label>
</p>
<div class="control is-grouped">
  <p class="control">
    <button class="button is-primary" disabled>Submit</button>
  </p>
  <p class="control">
    <button class="button" disabled>Cancel</button>
  </p>
</div>

With Font Awesome icons

<p class="control has-icon">
  <input class="input" type="email" placeholder="Email">
  <span class="icon is-small">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input" type="password" placeholder="Password">
  <span class="icon is-small">
    <i class="fa fa-lock"></i>
  </span>
</p>
<p class="control">
  <button class="button is-success">
    Login
  </button>
</p>

New!

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.

<p class="control has-icon">
  <input class="input is-small" type="email" placeholder="Email">
  <span class="icon is-small">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input" type="email" placeholder="Email">
  <span class="icon is-small">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input" type="email" placeholder="Email">
  <span class="icon">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-medium" type="email" placeholder="Email">
  <span class="icon is-small">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-medium" type="email" placeholder="Email">
  <span class="icon">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-medium" type="email" placeholder="Email">
  <span class="icon is-medium">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-large" type="email" placeholder="Email">
  <span class="icon is-small">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-large" type="email" placeholder="Email">
  <span class="icon">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-large" type="email" placeholder="Email">
  <span class="icon is-medium">
    <i class="fa fa-envelope"></i>
  </span>
</p>
<p class="control has-icon">
  <input class="input is-large" type="email" placeholder="Email">
  <span class="icon is-large">
    <i class="fa fa-envelope"></i>
  </span>
</p>

By appending the has-icon-right, the icon will be placed on the right side instead.

<p class="control has-icon has-icon-right">
  <input class="input is-small" type="email" placeholder="Email">
  <span class="icon is-small">
    <i class="fa fa-check"></i>
  </span>
</p>
<p class="control has-icon has-icon-right">
  <input class="input" type="email" placeholder="Email">
  <span class="icon">
    <i class="fa fa-check"></i>
  </span>
</p>
<p class="control has-icon has-icon-right">
  <input class="input is-medium" type="email" placeholder="Email">
  <span class="icon is-medium">
    <i class="fa fa-check"></i>
  </span>
</p>
<p class="control has-icon has-icon-right">
  <input class="input is-large" type="email" placeholder="Email">
  <span class="icon is-large">
    <i class="fa fa-check"></i>
  </span>
</p>

Form addons

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

<p class="control has-addons">
  <input class="input" type="text" placeholder="Find a repository">
  <a class="button is-info">
    Search
  </a>
</p>

You can attach inputs, buttons, and dropdowns only.

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

Transfer

Transfer

<p class="control has-addons">
  <span class="select">
    <select>
      <option>$</option>
      <option>£</option>
      <option></option>
    </select>
  </span>
  <input class="input is-expanded" type="text" placeholder="Amount of money">
  <a class="button">
    Transfer
  </a>
</p>
<p class="control has-addons">
  <span class="select">
    <select>
      <option>$</option>
      <option>£</option>
      <option></option>
    </select>
  </span>
  <input class="input is-expanded" type="text" placeholder="Amount of money">
  <a class="button">
    Transfer
  </a>
</p>

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

Transfer

<p class="control has-addons has-addons-centered">
  <span class="select">
    <select>
      <option>$</option>
      <option>£</option>
      <option></option>
    </select>
  </span>
  <input class="input" type="text" placeholder="Amount of money">
  <a class="button is-primary">
    Transfer
  </a>
</p>

Transfer

<p class="control has-addons has-addons-right">
  <span class="select">
    <select>
      <option>$</option>
      <option>£</option>
      <option></option>
    </select>
  </span>
  <input class="input" type="text" placeholder="Amount of money">
  <a class="button is-primary">
    Transfer
  </a>
</p>

Form group

If you want to group controls together, use the is-grouped modifier on the control container.
Add the is-expanded modifier on the control element you want to fill up the remaining space.

<div class="control is-grouped">
  <p class="control is-expanded">
    <input class="input" type="text" placeholder="Find a repository">
  </p>
  <p class="control">
    <a class="button is-info">
      Search
    </a>
  </p>
</div>

Horizontal form

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

  • control-label for the side label
  • control for the input/select/textarea container

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

<div class="control is-horizontal">
  <div class="control-label">
    <label class="label">From</label>
  </div>
  <div class="control is-grouped">
    <p class="control is-expanded">
      <input class="input" type="text" placeholder="Name">
    </p>
    <p class="control is-expanded">
      <input class="input" type="email" placeholder="Email">
    </p>
  </div>
</div>
<div class="control is-horizontal">
  <div class="control-label">
    <label class="label">Subject</label>
  </div>
  <div class="control">
    <div class="select is-fullwidth">
      <select>
        <option>General enquiry</option>
      </select>
    </div>
  </div>
</div>
<div class="control is-horizontal">
  <div class="control-label">
    <label class="label">Question</label>
  </div>
  <div class="control">
    <textarea class="textarea" placeholder="Explain how we can help you"></textarea>
  </div>
</div>

Bulma Newsletter

Get notified when v1 is ready!