You are viewing the deprecated 0.5.0 version of the website. Click here to view the latest version

Documentation

Everything you need to create a website with Bulma

# Modal

## A classic modal overlay, in which you can include any content you want

Colors No
Sizes No
Variables Yes

The modal structure is very simple:

- `modal`: the main container
  - `modal-background`: a transparent overlay that can act as a click target to close the modal
  - `modal-content`: a horizontally and verticaly centered container, with a maximum width of 640px, in which you can include any content
  - `modal-close`: a simple cross located in the top right corner

Launch example modal

    <div class="modal">
      <div class="modal-background"></div>
      <div class="modal-content">
        <!-- Any other Bulma elements you want -->
      </div>
      <button class="modal-close is-large"></button>
    </div>

To activate the modal, just add the `is-active` modifier on the `.modal` container

No JavaScript
Bulma does not include any JavaScript interaction. You will have to implement the class toggle yourself.

### Image modal

Because a modal can contain anything you want, you can very simply use it to build an image gallery for example:

Launch image modal

    <div class="modal">
      <div class="modal-background"></div>
      <div class="modal-content">
        <p class="image is-4by3">
          <img src="http://bulma.io/versions/0.5.0/images/placeholders/1280x960.png">
        </p>
      </div>
      <button class="modal-close is-large"></button>
    </div>

### Modal card

If you want a more classic modal, with a head, a body and a foot, use the `modal-card`.

Launch modal card

    <div class="modal">
      <div class="modal-background"></div>
      <div class="modal-card">
        <header class="modal-card-head">
          <p class="modal-card-title">Modal title</p>
          <button class="delete"></button>
        </header>
        <section class="modal-card-body">
          <!-- Content ... -->
        </section>
        <footer class="modal-card-foot">
          <a class="button is-success">Save changes</a>
          <a class="button">Cancel</a>
        </footer>
      </div>
    </div>

### Variables #

You can use these variables to customize this component. Simply set one or multiple of these variables before importing Bulma. Learn how.

Name | Default value
--- | ---
Name | Default value
`$modal-z` | `20`
`$modal-background-background-color` | `rgba($black, 0.86)`
`$modal-content-width` | `640px`
`$modal-content-margin-mobile` | `20px`
`$modal-content-spacing-mobile` | `160px`
`$modal-content-spacing-tablet` | `40px`
`$modal-close-dimensions` | `40px`
`$modal-close-right` | `20px`
`$modal-close-top` | `20px`
`$modal-card-spacing` | `40px`
`$modal-card-head-background-color` | `$background`
`$modal-card-head-border-bottom` | `1px solid $border`
`$modal-card-head-padding` | `20px`
`$modal-card-head-radius` | `$radius-large`
`$modal-card-title-color` | `$text-strong`
`$modal-card-title-line-height` | `1`
`$modal-card-title-size` | `$size-4`
`$modal-card-foot-radius` | `$radius-large`
`$modal-card-foot-border-top` | `1px solid $border`
`$modal-card-body-background-color` | `$white`
`$modal-card-body-padding` | `20px`

John Smith @johnsmith 31m
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.

# Hello World

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.

## Second level

Curabitur accumsan turpis pharetra augue tincidunt blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.

- In fermentum leo eu lectus mollis, quis dictum mi aliquet.
- Morbi eu nulla lobortis, lobortis est in, fringilla felis.
- Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
- Ut non enim metus.

### Third level

Quisque ante lacus, malesuada ac auctor vitae, congue non ante. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu rutrum tellus.

1. Donec blandit a lorem id convallis.
2. Cras gravida arcu at diam gravida gravida.
3. Integer in volutpat libero.
4. Donec a diam tellus.
5. Aenean nec tortor orci.
6. Quisque aliquam cursus urna, non bibendum massa viverra eget.
7. Vivamus maximus ultricies pulvinar.

> Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus sit amet turpis.

Quisque at semper enim, eu hendrerit odio. Etiam auctor nisl et justo sodales elementum. Maecenas ultrices lacus quis neque consectetur, et lobortis nisi molestie.

Sed sagittis enim ac tortor maximus rutrum. Nulla facilisi. Donec mattis vulputate risus in luctus. Maecenas vestibulum interdum commodo.

Suspendisse egestas sapien non felis placerat elementum. Morbi tortor nisl, suscipit sed mi sit amet, mollis malesuada nulla. Nulla facilisi. Nullam ac erat ante.

#### Fourth level

Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet, at elementum ex efficitur.

Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut vehicula. Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.

Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in felis. Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper. Etiam tristique, leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac posuere est. Nunc ultricies nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan pulvinar. Nullam nec nisl placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel condimentum. Nam pharetra varius metus non pellentesque.

##### Fifth level

Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit. Praesent aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a eleifend augue laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.

###### Sixth level

Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend eros accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim vitae, malesuada ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit vel rutrum commodo, ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.

This page is open source. Noticed a typo? Or something unclear? Improve this page on GitHub

Bulma Partners

Check out their products!

Bulma Newsletter

Get notified when v1 is ready!