Bulma modifiers are basically started with either is-
or has-
. It is used to provide alternative styles to HTML elements.
Bulma provides following modifiers that is useful for :
Bulma CSS provides different styles of buttons:
To create button with different style use the followings predefined button helper classes:
is-primary
, is-link
, is-info
, is-success
, is-warning
, is-danger
.
General Syntax
<element class="button is-{primary | secondary | is-link | is-info | is-success | is-warning | is-danger } ">Button</element>
Source Code
<div class="container">
<div class="columns is-mobile">
<div class="column">
<button class="button is-primary">Primary</button>
</div>
<div class="column">
<button class="button is-link">Link</button>
</div>
<div class="column">
<button class="button is-info">Info</button>
</div>
</div>
<div class="columns is-mobile">
<div class="column">
<button class="button is-success">Success</button>
</div>
<div class="column">
<button class="button is-warning">Warning</button>
</div>
<div class="column">
<button class="button is-danger">Danger</button>
</div>
</div>
</div>
Source Code : Output
There are the following types of button sizes such as small buttons, medium buttons, and large buttons.
Follow the following steps to create different size buttons:
.button
class as well as .is-*
class to the button element base class.
*
denotes {small
| medium
| large
}
Source Code
<div class="columns is-multiline has-text-centered mt-5 is-mobile">
<div class="column is-4">
<button type="button" class="button is-primary is-small">Primary</button>
</div>
<div class="column is-4">
<button type="button" class="button is-link is-medium">Link</button>
</div>
<div class="column is-4">
<button type="button" class="button is-info is-large">Info</button>
</div>
</div>
Source Code : Output
There are mainly following types of the button states such as :is-outlined
, is-loading
, [disabled]
To create different states of button, you have to follow the following steps:
.button
, is-{outlined| loading|}
to create
outline button states as well as loading button states Correspondingly..is-{primary | success | info | danger | warning | link}
to the <button>
element base class. disabled
property to the button element.
General Syntax
<element class="btn is-{primary | success | info | danger | warning | link} is-{outline | lodaing }"></element>
Source Code
<div class="columns is-multiline has-text-centered mt-5 is-mobile">
<div class="column is-4">
<button type="button" class="button is-primary is-outlined">Primary</button>
</div>
<div class="column is-4">
<button type="button" class="button is-link is-loading">Link</button>
</div>
<div class="column is-4">
<button type="button" class="button is-info" disabled>Info</button>
</div>
</div>
Source Code : Output