Open In App

Bulma Flexbox

Bulma is a free and open-source CSS framework based on Flexbox. It is component-rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.

A flexbox is a layout used to define various columns and rows that makes the grid-like structure. It is used to design a flexible responsive layout structure without using float or positioning.



Bulma Flexbox Components:

Syntax:



<div class="Flexbox-Component-Class">
  ...
</div>

Example 1: In the below example, we will make use of the ‘is-flex-direction-row-reverse‘ to change the direction of the element.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <link rel="stylesheet" href=
</head>
  
<body>
    <div class="container">
        <h1 class="title has-text-centered">
            GeeksforGeeks
        </h1>
        <div class="columns is-flex-direction-row-reverse">
            <div class="p-2 bd-highlight 
                has-background-primary"> 1 </div>
            <div class="p-2 bd-highlight 
                has-background-primary"> 2 </div>
            <div class="p-2 bd-highlight 
                has-background-primary"> 3 </div>
            <div class="p-2 bd-highlight 
                has-background-primary"> 4 </div>
            <div class="p-2 bd-highlight 
                has-background-primary"> 5 </div>
        </div>
    </div>
</body>
</html>

Output:

 

Example 2: In the below example, we will make use of the ‘is-flex-direction-row‘ to change the size of the element.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <link rel="stylesheet" href=
</head>
  
<body>
    <div class="container">
        <h1 class="title has-text-centered">
            GeeksforGeeks
        </h1>
        <div class="columns is-flex-direction-row">
            <div class="p-2 bd-highlight
                has-background-danger"> one 
            </div>
            <div class="p-2 bd-highlight
                has-background-warning"> two 
            </div>
            <div class="p-2 bd-highlight
                has-background-danger"> three 
            </div>
        </div>
    </div>
</body>
</html>

Output:

 

Reference: https://bulma.io/documentation/helpers/flexbox-helpers/


Article Tags :