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 #
Displays #
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 | Type | Default value | Computed value |
---|---|---|---|
Name | Type | Default value | Computed value |
$button-color
|
color |
$grey-darker
|
hsl(0, 0%, 21%)
|
$button-background-color
|
color |
$white
|
hsl(0, 0%, 100%)
|
$button-border-color
|
color |
$grey-lighter
|
hsl(0, 0%, 86%)
|
$button-border-width
|
variable |
$control-border-width
|
|
$button-padding-vertical
|
size |
calc(0.375em - #{$button-border-width})
|
|
$button-padding-horizontal
|
size |
0.75em
|
|
$button-hover-color
|
color |
$link-hover
|
hsl(0, 0%, 21%)
|
$button-hover-border-color
|
color |
$link-hover-border
|
hsl(0, 0%, 71%)
|
$button-focus-color
|
color |
$link-focus
|
hsl(0, 0%, 21%)
|
$button-focus-border-color
|
color |
$link-focus-border
|
hsl(217, 71%, 53%)
|
$button-focus-box-shadow-size
|
size |
0 0 0 0.125em
|
|
$button-focus-box-shadow-color
|
color |
rgba($link, 0.25)
|
|
$button-active-color
|
color |
$link-active
|
hsl(0, 0%, 21%)
|
$button-active-border-color
|
color |
$link-active-border
|
hsl(0, 0%, 29%)
|
$button-text-color
|
color |
$text
|
hsl(0, 0%, 29%)
|
$button-text-hover-background-color
|
color |
$background
|
hsl(0, 0%, 96%)
|
$button-text-hover-color
|
color |
$text-strong
|
hsl(0, 0%, 21%)
|
$button-disabled-background-color
|
color |
$white
|
hsl(0, 0%, 100%)
|
$button-disabled-border-color
|
color |
$grey-lighter
|
hsl(0, 0%, 86%)
|
$button-disabled-shadow
|
string |
none
|
|
$button-disabled-opacity
|
unitless |
0.5
|
|
$button-static-color
|
color |
$grey
|
hsl(0, 0%, 48%)
|
$button-static-background-color
|
color |
$white-ter
|
hsl(0, 0%, 96%)
|
$button-static-border-color
|
color |
$grey-lighter
|
hsl(0, 0%, 86%)
|
This page is open source.
Noticed a typo? Or something unclear?
Improve this page on GitHub