The button is an essential element of any design. It's meant to look and behave as an interactive element of your page.
Button
The classic button, in different colors, sizes, and states
The .button
class can be used on:
-
<a>
anchor links -
<button>
form buttons -
<input type="submit">
submit inputs -
<input type="reset">
reset inputs
Colors #
Sizes #
Styles #
Outlined
Inverted (the text color becomes the background color, and vice-versa)
Invert Outlined (the invert color becomes the text and border colors)
Rounded buttons
States #
Normal
Hover
Focus
Active
Loading
Static
You can create a non-interactive button by using the is-static
modifier. This is useful to align a text label with an input, for example when using form addons.
Disabled
With Font Awesome icons
If the button only contains an icon, Bulma will make sure the button remains square, no matter the size of the button or of the icon.
Button group #
If you want to group buttons together on a single line, use the is-grouped
modifier on the field
container:
Button addons #
If you want to use buttons as addons, use the has-addons
modifier on the field
container:
Button group with addons #
You can group together addons as well:
List of buttons #
You can now create a list of buttons with the .buttons
container.
If the list is very long, it will automatically wrap on multiple lines, while keeping all buttons evenly spaced.
You can attach buttons together with the .has-addons
modifier.
Use the is-centered
or the is-right
modifiers to alter the alignment.
You can use any modifier class on each button to differentiate them. Make sure to add the is-selected
modifier as well to make sure the selected button is above its siblings.
Variables #
You can use these variables to customize this element. Simply set one or multiple of these variables before importing Bulma. Learn how.
Name | Default value |
---|---|
Name | Default value |
$button-color
|
$grey-darker
|
$button-background-color
|
$white
|
$button-border-color
|
$grey-lighter
|
$button-hover-color
|
$link-hover
|
$button-hover-border-color
|
$link-hover-border
|
$button-focus-color
|
$link-focus
|
$button-focus-border-color
|
$link-focus-border
|
$button-focus-box-shadow-size
|
0 0 0 0.125em
|
$button-focus-box-shadow-color
|
rgba($link, 0.25)
|
$button-active-color
|
$link-active
|
$button-active-border-color
|
$link-active-border
|
$button-text-color
|
$text
|
$button-text-hover-background-color
|
$background
|
$button-text-hover-color
|
$text-strong
|
$button-disabled-background-color
|
$white
|
$button-disabled-border-color
|
$grey-lighter
|
$button-disabled-shadow
|
none
|
$button-disabled-opacity
|
0.5
|
$button-static-color
|
$grey
|
$button-static-background-color
|
$white-ter
|
$button-static-border-color
|
$grey-lighter
|
This page is open source.
Noticed a typo? Or something unclear?
Improve this page on GitHub