Bulma Tabs Variables

Last Updated : 23 Jul, 2025

Bulma is an Open source CSS framework developed by Jeremy Thomas. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.

Tabs in Bulma are simple responsive horizontal navigation tabs with different styles. They require the following structure:

  • A container for the tabs.
  • The HTML <ul> element for holding the tags.
  • A list of <li> elements for each tag.
  • HTML anchor elements <a> for each tag link.

Variable Used:

Variable-NameDescriptionTypeValueComputed ValueComputed Type
$tabs-border-bottom-colorThis variable is used to define the color of the bottom border.variable$borderhsl(0, 0%, 86%)color
$tabs-border-bottom-styleThis variable is used to define the style of the bottom border.stringsolid  
$tabs-border-bottom-widthThis variable is used to define the width of the bottom border.size1px  
$tabs-link-colorThis variable is used to define the color of the link.variable$texthsl(0, 0%, 29%)color
$tabs-link-hover-border-bottom-colorThis variable is used to define the color to the  bottom border of the link on hovervariable$text-stronghsl(0, 0%, 21%)color
$tabs-link-hover-colorThis variable is used to define the color of the link on hover.variable$text-stronghsl(0, 0%, 21%)color
$tabs-link-active-border-bottom-colorThis variable is used to define the color of the bottom border of the active link.variable$linkhsl(229, 53%,  53%)color
$tabs-link-active-colorThis variable is used to define the color of the active link.variable$linkhsl(229, 53%,  53%)color
$tabs-link-paddingThis variable is used to define the padding of the link.size0.5em 1em  
$tabs-boxed-link-radiusThis variable is used to define the radius of the link.variable$radius4pxsize
$tabs-boxed-link-hover-background-colorThis variable is used to define the background color of the link on hover.variable$backgroundhsl(0, 0%, 96%)color
$tabs-boxed-link-hover-border-bottom-colorThis variable is used to define the color of the bottom border of the link on hover.variable$borderhsl(0, 0%, 86%)color
$tabs-boxed-link-active-background-colorThis variable is used to define the background color of the active link.variable$scheme-mainhsl(0, 0%, 100%)color
$tabs-boxed-link-active-border-colorThis variable is used to define the border color of the link.variable$borderhsl(0, 0%, 86%)color
$tabs-boxed-link-active-border-bottom-colorThis variable is used to define the color of the bottom border of the active linkstringtransparent  
$tabs-toggle-link-border-colorThis variable is used to define the color of the border of the link When we toggle.variable$borderhsl(0, 0%, 86%)color
$tabs-toggle-link-border-styleThis variable is used to define the style of the border on a togglestringsolid  
$tabs-toggle-link-border-widthThis variable is used to define the width of the border of the link on a togglesize1px  
$tabs-toggle-link-hover-background-colorThis variable is used to define the background color of the link on hover on a togglevariable$backgroundhsl(0, 0%, 96%)color
$tabs-toggle-link-hover-border-colorThis variable is used to define the color of the border of the link on the toggle.variable$border-hoverhsl(0, 0%, 71%)color
$tabs-toggle-link-radiusThis variable is used to define the radius on a toggle.variable$radius4pxsize
$tabs-toggle-link-active-background-colorThis variable is used to define the background color of the active link on a toggle.variable$linkhsl(229, 53%,  53%)color
$tabs-toggle-link-active-border-colorThis variable is used to define the color of the active border on a togglevariable$linkhsl(229, 53%,  53%)color
$tabs-toggle-link-active-colorThis variable is used to define the color of the active link on a toggle.variable$link-invert#fffcolor

Example 1: In the below code, we will make use of the above variable to demonstrate tab.

HTML
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content=
"width=device-width,initial-scale=1">
    <link rel="stylesheet" href=
"https://cdn.jsdelivr.net/npm/bulma@0.8.0/css/bulma.min.css">
    <link rel="stylesheet" href="style.css">
    
    <title>Bulma Variable</title>
    <!-- font-awesome cdn -->
    <script src=
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-2/js/all.min.js'>
    </script>
</head>

<body>
    <center>
        <h1 class="title" style="color:green;" >
            GeeksforGeeks
        </h1>        
        <h3 class="subtitle">
            A computer science portal for geeks
        </h3>       
    
        <div class='container'>
            <div class="columns is-centered">
                <div class="column is-10">
                    <div class="tabs">
                        <ul>
                            <li class="is-active"><a>Home</a>
                            </li>
                            <li><a>Articles</a></li>
                            <li><a>Lectures</a></li>
                            <li><a>Documentation</a></li>
                            <li><a>Contact Us</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>    
    </center>
</body>
</html>

SCSS Code:

$tabs-link-padding:10px;
li {
   padding:$tabs-link-padding;
}

Compiled CSS Code:

li  {
   padding: 10px; 
}

Output:

 

Example 2: In the below code, we will make use of the above variable to demonstrate Tab.

HTML
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content=
"width=device-width,initial-scale=1">
    <link rel="stylesheet" href=
"https://cdn.jsdelivr.net/npm/bulma@0.8.0/css/bulma.min.css">
    <link rel="stylesheet" href="style.css">
    
    <title>Bulma Variable</title>
    <!-- font-awesome cdn -->
    <script src=
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-2/js/all.min.js'>
    </script>
</head>

<body>
    <center>
        <h1 class="title" style="color:green;" >
            GeeksforGeeks
        </h1>        
        <h3 class="subtitle">
            A computer science portal for geeks
        </h3>       
    
        <div class='container'>
            <div class="columns is-centered">
                <div class="column is-10">
                    <div class="tabs">
                        <ul>
                            <li class="is-active"><a>Home</a>
                            </li>
                            <li><a>Articles</a></li>
                            <li><a>Lectures</a></li>
                            <li><a>Documentation</a></li>
                            <li><a>Contact Us</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>    
    </center>
</body>
</html>

SCSS Code:

$tabs-boxed-link-active-border-color:2px solid green;
li {
    border:$tabs-boxed-link-active-border-color;
}

Compiled CSS Code:

li {
    border: 2px solid green; 
}

Output:

 

Reference: https://bulma.io/documentation/components/tabs/#variables

Comment