DEV Community

Leo Kalshteyn
Leo Kalshteyn

Posted on

Intro to Bulma

I recently starting using a CSS framework called Bulma for a small react app I am making, which improves upon CSS significantly. It is open-source, standardizes criteria and concepts, and deals with quite a few issues in front-end development as a whole. It is based on Flexbox and reduces the amount of CSS code needed for customizing layouts.

It is quite easy to learn and there are many templates on the official site for starting out. Bulma is also modular, allowing users to use parts of it like button styles or columns by importing .sass files. It also contains a large of components for anything one might need for a frontend layout and it also is compatible with most web browsers.


npm install bulma

You also need to make your webpage responsive for Bulma to work correctly either by using the HTML5 doctype:

<!DOCTYPE html>

Or add the responsive viewport meta tag:

<meta name="viewport" content="width=device-width, initial-scale=1">

Quick Guide

An HTML starter template from the official site:

<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Hello Bulma!</title>
    <link rel="stylesheet" href="">
  <section class="section">
    <div class="container">
      <h1 class="title">
        Hello World
      <p class="subtitle">
        My first website with <strong>Bulma</strong>!
Enter fullscreen mode Exit fullscreen mode
  • Bulma modifier classes allow you to set alternative styles to almost all of the Bulma elements. Starting with is- or has-, you add after - a style of your choice. Example with buttons:
<button class="button">

<button class="button is-primary">
   Primary button
Enter fullscreen mode Exit fullscreen mode

There are many more components like colors, cards, containers, dropdowns etc. that you can see in the documentation on the official site. Also Bulma libraries exist for React and Vue and other frameworks.


Top comments (2)

juancarlospaco profile image
Juan Carlos

I use Bulma with Nim lang, and made a visual editor for it:

wallwrecker profile image

Yep i use it, and it's great.