Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master themPractice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM levelTournamentsLive coding speed tournamentsArcade GamesZType, Overkill Survival, Glyphica & moreGamificationXP, coins, badges & quests
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFree ToolsWPM calculator, typing speed report & moreFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & missionSupportGet help — Pro users get priorityContactGet in touch with the team
Pricing
  1. Home
  2. /
  3. Learn
  4. /
  5. Bulma

Learn Bulma - 10 Code Examples & CST Typing Practice Test

Bulma is a modern, open-source CSS framework based entirely on Flexbox. It provides a clean, responsive, and modular approach to building web interfaces without any JavaScript dependencies.

View all 10 Bulma code examples →
Bulma Counter ExampleBulma Notification ExampleBulma Hero Section ExampleBulma Navbar ExampleBulma Card ExampleBulma Modal ExampleBulma Tabs ExampleBulma Form ExampleBulma Table ExampleBulma Breadcrumb Example

Learn BULMA with Real Code Examples

Updated Nov 23, 2025

Explain

Bulma uses a mobile-first responsive design powered by Flexbox.

It provides prebuilt components like buttons, forms, modals, and navbars.

Its modular structure allows developers to import only what they need, keeping projects lightweight.

Core Features

Responsive columns with `.columns` and `.column`

Utility classes for spacing, colors, and typography

Built-in modifiers for responsive behavior

Sass-based customization

Flexbox-powered layout and alignment

Basic Concepts Overview

Containers (`.container`)

Columns (`.columns` and `.column`)

Modifiers (`.is-primary`, `.is-flex`, `.is-hidden`) for utilities

Prebuilt components (buttons, cards, navbars)

Responsiveness with breakpoints (`is-mobile`, `is-desktop`)

Project Structure

index.html - main layout

assets/css/ - custom styles or Sass

node_modules/bulma - installed framework

partials/ - reusable components (navbar, footer)

custom.scss - optional theme overrides

Building Workflow

Include Bulma CSS in project

Define container and columns layout

Add components like buttons and cards

Apply modifiers for colors, sizes, and responsiveness

Customize using Sass if needed

Difficulty Use Cases

Beginner: simple responsive page

Intermediate: landing page with multiple sections

Advanced: dashboard with complex layouts

Expert: fully customized theme via Sass

Community: modular Bulma-based applications

Comparisons

Lighter than Bootstrap

No JS dependencies unlike Bootstrap

Flexbox-first layout system

Smaller ecosystem than Bootstrap

Simple syntax for rapid prototyping

Versioning Timeline

2016 - Initial release of Bulma

2017 - Added more components and modifiers

2018 - Flexbox enhancements and improved helpers

2019 - Modular imports and Sass variables refinement

2021 - Current stable version with extensions ecosystem

Glossary

Columns: Flexbox-based content blocks

Modifiers: classes to adjust style or behavior

Helpers: small utility classes for alignment, spacing

Containers: wrappers for layout

Components: prebuilt UI elements like buttons, cards

Installation Setup

Include via CDN (CSS only)

Install via npm: `npm install bulma`

Import specific Sass modules for custom builds

Use with bundlers like Webpack or Vite

No JavaScript setup needed for basic styling

Environment Setup

Include Bulma CSS via CDN or npm

Set up custom Sass imports if needed

Organize project components and containers

Test responsiveness and Flexbox layouts

Integrate with JS frameworks if required

Config Files

package.json - npm setup

scss/_variables.scss - theme customization

custom.scss - project-specific overrides

index.html - entry point

webpack.config.js - optional bundling setup

Cli Commands

npm install bulma - install framework

npm run build - compile custom Sass

npm start - development server

Use bundlers to include only required modules

No official CLI needed for CSS-only framework

Internationalization

Framework itself is language-agnostic

Text content handled via templates

Integrates with i18n libraries in JS frameworks

Forms and notifications can be localized

CSS works regardless of language direction

Accessibility

Supports semantic HTML structure

ARIA attributes managed by developer

Keyboard navigation handled externally if needed

Screen-reader compatible if semantic HTML used

Focus management handled via custom JS

Ui Styling

CSS classes for layout and components

Utility classes for colors, typography, and spacing

Responsive breakpoints with modifiers

Sass variables for theming

Flexbox-powered alignment and layouts

State Management

Bulma does not handle state

Use JS frameworks or vanilla JS for state logic

Plugins or dynamic behaviors require separate JS

Forms and modals behavior managed externally

Flexbox handles layout alignment only

Data Management

CSS-only - no internal data handling

Dynamic content handled via JS frameworks

Form validation done with JS or HTML5

Components are static unless combined with JS

Integrates with Vue/React/Angular for data-driven apps

Architecture

Flexbox grid system

Component-based modular CSS

Mobile-first design philosophy

Utility-first approach for helpers

Sass variables for customization

Rendering Model

CSS-driven styling

Flexbox grid for layout

Helper classes for alignment, spacing, colors

Responsive modifiers for breakpoints

Optional Sass theming

Architectural Patterns

Component-based modular CSS

Mobile-first responsive grid

Utility-first helpers

No JavaScript plugin architecture

Sass workflow for customization

Real World Architectures

Marketing landing pages

Admin dashboards

Small web apps

Landing page prototypes

Static or dynamic content websites

Design Principles

Flexbox-first responsive design

Modular and lightweight

No JavaScript dependencies

Utility-first helper classes

Sass-based customization

Scalability Guide

Use modular Sass imports

Import only needed components

Combine with JS frameworks for dynamic apps

Keep consistent modifier usage

Use Flexbox helpers for reusable layouts

Migration Guide

Switching from Bootstrap: adapt grid classes to `.columns` / `.column`

Replace utility classes with Bulma helpers

Remove JS plugin dependencies

Rework custom themes with Bulma Sass variables

Test layouts for Flexbox responsiveness

Performance Notes

Import only required modules via Sass

Use minified CSS for production

Avoid unnecessary custom overrides

Keep HTML structure clean for Flexbox efficiency

Leverage helpers instead of custom CSS where possible

Security Notes

Sanitize any user-generated content

Avoid inline styles for dynamic content

Use HTTPS for CDN resources

Follow best practices for forms

Validate inputs for web forms

Monitoring Analytics

Check CSS bundle size

Audit responsiveness across devices

Accessibility testing

Browser compatibility tests

Monitor custom JS plugin behavior

Code Quality

Use semantic HTML with Bulma classes

Avoid inline styling when possible

Leverage helper classes for alignment

Minify CSS for production

Document Sass variable overrides

Practical Examples

Responsive navbar with menu items

Card-based content layout

Form with styled inputs and buttons

Hero section with full-width columns

Flexbox-aligned media objects

Troubleshooting

Ensure correct `.columns` and `.column` nesting

Check Flexbox alignment modifiers

Verify responsive modifiers for different breakpoints

Resolve CSS specificity conflicts with custom styles

Confirm Sass variables are compiled correctly if used

Testing Guide

Visual testing across browsers

Responsive testing with device simulators

Accessibility testing with screen readers

Unit testing custom JS enhancements

Integration testing with front-end frameworks

Deployment Options

Static site hosting (Netlify, Vercel)

Bundled with JS frameworks for SPAs

CDN-hosted CSS for fast delivery

Custom Sass compiled for production

Lightweight web app deployment

Tools Ecosystem

Bulma Extensions (carousel, dropdowns, tiles)

Sass for theming

Buefy (Vue integration)

React-bulma-components

Bulma templates and UI kits

Integrations

Works with React via react-bulma-components

Vue integration via Buefy

Angular integration possible with wrappers

Compatible with static HTML projects

Can be combined with JS frameworks for interactivity

Productivity Tips

Use helper classes instead of custom CSS

Leverage prebuilt components for faster UI

Customize Sass variables early

Import only needed modules

Test layout alignment frequently

Challenges

Build a responsive landing page

Create a card-based dashboard

Implement a hero section with columns

Style forms and buttons with modifiers

Integrate Bulma with a JS framework

Learning Path

Learn Flexbox fundamentals

Understand `.columns` and `.column`

Explore prebuilt components and helpers

Practice responsive modifiers

Customize Bulma with Sass variables

Skill Improvement Plan

Week 1: Basic layout with columns

Week 2: Components and helpers

Week 3: Responsive design practice

Week 4: Sass customization

Week 5: Advanced modular projects

Interview Questions

What is Bulma and why use it?

How does Bulma differ from Bootstrap?

Explain the Flexbox-based grid system.

How do you customize Bulma with Sass?

How does Bulma handle responsiveness?

Cheat Sheet

`.columns` - wrapper for Flexbox columns

`.column` - single column inside `.columns`

`.is-primary`, `.is-success` - color modifiers

`.is-mobile`, `.is-desktop` - responsive modifiers

Helper classes like `.has-text-centered`, `.is-flex`

Books

Mastering Bulma

Bulma by Example

Learning Bulma

Responsive Design with Bulma

Bulma UI Design Patterns

Tutorials

Bulma official documentation

YouTube Bulma tutorials

FreeCodeCamp Bulma course

Udemy Bulma courses

Community blogs and guides

Official Docs

https://bulma.io/

https://github.com/jgthms/bulma

https://bulma.io/documentation/

Community Links

Bulma GitHub

Stack Overflow bulma tag

Reddit r/bulma

Bulma Discord/Slack groups

Bulma extensions and templates

Community Support

Bulma GitHub repository

Stack Overflow bulma tag

Bulma Reddit community

Discord/Slack for Bulma discussions

Bulma extensions and UI kits from community

Monetization

Create Bulma templates for sale

Develop landing page kits

Rapid prototyping services

Custom dashboards for clients

CSS-only website development

Future Roadmap

Expand components and modifiers

Enhance Flexbox utilities

Improve Sass modularity

Better integrations with JS frameworks

Community-driven extensions growth

When Not To Use

When requiring prebuilt JavaScript components

If a large community ecosystem is needed

Projects with heavy UI interactions needing JS

When migrating from Bootstrap-heavy projects

Enterprise projects needing extensive themes and templates

Final Summary

Bulma is a lightweight, Flexbox-based CSS framework.

No JavaScript dependencies, fully modular.

Easy to learn and use for responsive layouts.

Customizable via Sass and utility classes.

Ideal for small-to-medium projects, dashboards, and marketing sites.

Faq

Is Bulma free?

Yes - open-source under MIT license.

Does Bulma include JS?

No - purely CSS framework.

Is Bulma responsive?

Yes - mobile-first Flexbox grid system.

Can I customize Bulma?

Yes - using Sass variables and modular imports.

Which browsers does Bulma support?

All modern browsers with Flexbox support.

Code Sample Descriptions

1

Bulma Counter Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Counter</title>
</head>
<body class="has-background-light">
    <section class="section">
        <div id="container" class="container has-text-centered box">
        <h2 class="title is-4">Counter: <span id="count">0</span></h2>
        <div class="buttons is-centered mb-4">
        <button id="increment" class="button is-primary">+</button>
        <button id="decrement" class="button is-danger">-</button>
        <button id="reset" class="button is-link">Reset</button>
        </div>
        <button id="theme-btn" class="button is-warning">Switch Theme</button>
        </div>
    </section>
    <script>
        let count = 0;
        let isDark = false;
        const countEl = document.getElementById('count');
        const container = document.getElementById('container');
        document.getElementById('increment').onclick = () => { count++; countEl.textContent = count; };
        document.getElementById('decrement').onclick = () => { count--; countEl.textContent = count; };
        document.getElementById('reset').onclick = () => { count = 0; countEl.textContent = count; };
        document.getElementById('theme-btn').onclick = () => {
        isDark = !isDark;
        container.classList.toggle('has-background-dark', isDark);
        container.classList.toggle('has-text-white', isDark);
        container.classList.toggle('has-background-light', !isDark);
        container.classList.toggle('has-text-black', !isDark);
        };
    </script>
</body>
</html>

Demonstrates a simple counter layout using Bulma classes and minimal JavaScript for interactivity.

Let’s Try →
2

Bulma Notification Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Notification</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <div class="notification is-primary">
        <button class="delete"></button>
        This is a primary notification.
        </div>
        </div>
    </section>
    <script>
        document.querySelectorAll('.notification .delete').forEach(btn => {
        btn.addEventListener('click', () => btn.parentElement.remove());
        });
    </script>
</body>
</html>

Shows how to create dismissible notification boxes using Bulma.

Let’s Try →
3

Bulma Hero Section Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Hero</title>
</head>
<body>
    <section class="hero is-info is-fullheight">
        <div class="hero-body">
        <div class="container has-text-centered">
        <h1 class="title">Welcome to Bulma</h1>
        <h2 class="subtitle">Simple hero section example</h2>
        </div>
        </div>
    </section>
</body>
</html>

Demonstrates a responsive hero section using Bulma classes.

Let’s Try →
4

Bulma Navbar Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Navbar</title>
</head>
<body>
    <nav class="navbar is-primary" role="navigation" aria-label="main navigation">
        <div class="navbar-brand">
        <a class="navbar-item" href="#">Brand</a>
        <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
        <span aria-hidden="true"></span>
        <span aria-hidden="true"></span>
        <span aria-hidden="true"></span>
        </a>
        </div>
        <div class="navbar-menu">
        <div class="navbar-start">
        <a class="navbar-item">Home</a>
        <a class="navbar-item">About</a>
        <a class="navbar-item">Contact</a>
        </div>
        </div>
    </nav>
    <script>
        document.addEventListener('DOMContentLoaded', () => {
        const burger = document.querySelector('.navbar-burger');
        const menu = document.querySelector('.navbar-menu');
        burger.addEventListener('click', () => menu.classList.toggle('is-active'));
        });
    </script>
</body>
</html>

Shows how to create a responsive navbar with Bulma.

Let’s Try →
5

Bulma Card Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Card</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <div class="columns">
        <div class="column is-one-third">
        <div class="card">
        <div class="card-image">
        <figure class="image is-4by3">
        <img src="https://via.placeholder.com/300" alt="Placeholder">
        </figure>
        </div>
        <div class="card-content">
        <p class="title is-4">Card Title</p>
        <p class="content">This is an example card using Bulma.</p>
        </div>
        </div>
        </div>
        </div>
        </div>
    </section>
</body>
</html>

Demonstrates a simple card layout using Bulma classes.

Let’s Try →
6

Bulma Modal Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Modal</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <button id="openModal" class="button is-primary">Open Modal</button>
        <div id="modal" class="modal">
        <div class="modal-background"></div>
        <div class="modal-content box">Hello, this is a modal!</div>
        <button class="modal-close is-large" aria-label="close"></button>
        </div>
        </div>
    </section>
    <script>
        const modal = document.getElementById('modal');
        document.getElementById('openModal').onclick = () => modal.classList.add('is-active');
        document.querySelectorAll('.modal-close, .modal-background').forEach(el => el.onclick = () => modal.classList.remove('is-active'));
    </script>
</body>
</html>

Shows how to create a modal dialog that can be opened and closed.

Let’s Try →
7

Bulma Tabs Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Tabs</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <div class="tabs is-centered">
        <ul>
        <li class="is-active"><a>Tab 1</a></li>
        <li><a>Tab 2</a></li>
        <li><a>Tab 3</a></li>
        </ul>
        </div>
        <div id="tabContent" class="content has-text-centered">Content for Tab 1</div>
        </div>
    </section>
    <script>
        const tabs = document.querySelectorAll('.tabs li');
        const content = document.getElementById('tabContent');
        tabs.forEach((tab, i) => tab.onclick = () => {
        tabs.forEach(t => t.classList.remove('is-active'));
        tab.classList.add('is-active');
        content.textContent = 'Content for Tab ' + (i+1);
        });
    </script>
</body>
</html>

Demonstrates a simple tab interface using Bulma.

Let’s Try →
8

Bulma Form Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Form</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <form>
        <div class="field">
        <label class="label">Name</label>
        <div class="control">
        <input class="input" type="text" placeholder="Your Name">
        </div>
        </div>
        <div class="field">
        <label class="label">Email</label>
        <div class="control">
        <input class="input" type="email" placeholder="Your Email">
        </div>
        </div>
        <div class="control">
        <button class="button is-primary">Submit</button>
        </div>
        </form>
        </div>
    </section>
</body>
</html>

Shows a simple form layout using Bulma form controls.

Let’s Try →
9

Bulma Table Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Table</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <table class="table is-striped is-hoverable is-fullwidth">
        <thead>
        <tr>
        <th>Name</th>
        <th>Email</th>
        <th>Role</th>
        </tr>
        </thead>
        <tbody>
        <tr>
        <td>John Doe</td>
        <td>john@example.com</td>
        <td>Admin</td>
        </tr>
        <tr>
        <td>Jane Smith</td>
        <td>jane@example.com</td>
        <td>User</td>
        </tr>
        </tbody>
        </table>
        </div>
    </section>
</body>
</html>

Demonstrates a responsive table using Bulma classes.

Let’s Try →
10

Bulma Breadcrumb Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" rel="stylesheet">
    <title>Bulma Breadcrumb</title>
</head>
<body>
    <section class="section">
        <div class="container">
        <nav class="breadcrumb" aria-label="breadcrumbs">
        <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Library</a></li>
        <li class="is-active"><a href="#" aria-current="page">Data</a></li>
        </ul>
        </nav>
        </div>
    </section>
</body>
</html>

Shows a breadcrumb navigation using Bulma classes.

Let’s Try →

Frequently Asked Questions about Bulma

What is Bulma?

Bulma is a modern, open-source CSS framework based entirely on Flexbox. It provides a clean, responsive, and modular approach to building web interfaces without any JavaScript dependencies.

What are the primary use cases for Bulma?

Responsive websites and web apps. Landing pages and marketing sites. Admin dashboards. Rapid prototyping. Projects requiring minimal JavaScript dependencies

What are the strengths of Bulma?

Fully Flexbox-based for easy layouts. No JavaScript required, lightweight. Simple syntax and modular structure. Responsive and mobile-first by default. Easy to learn for CSS beginners

What are the limitations of Bulma?

No native JavaScript components. Smaller ecosystem than Bootstrap. Some advanced UI components need custom implementation. Limited official themes/templates. Requires additional JS libraries for dynamic interactivity

How can I practice Bulma typing speed?

CodeSpeedTest offers 10+ real Bulma code examples for typing practice. You can measure your WPM, track accuracy, and improve your coding speed with guided exercises.

Learn Other Programming Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypherGremlinPartiqlHaskellElixirFsharpView all languages →
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Legal & Support

Pro ⚡ PricingContactPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.