Bulma Modifiers
Bulma Modifiers– Bulma Css provides modifier classes which can be used to add the alternative styles. Using Modifier classes you can easily modify the default styles. Modifier classes starts with is- or has-. Here in this article, we are going to explain how we can use modifier classes in Bulma.
Bulma Modifiers | Helpers | Css Classes Syntax & Example
Let us understand how modifier classes works step by step.
Topics
- Syntax
- Helpers
- Responsive Helpers
- Typography Helpers
Syntax
Modifier classes starts with is- or has- for example- is-primary, is-link. Suppose we want to change the default button style we can use these modifier classes. Now let us go through some important modifier classes.
Change Button Color
There are following classes that can be used to change the button color in Bulma.
- is-primary
- is-link
- is-info
- is-success
- is-warning
- is-danger
Using the above modifier classes you can create the following buttons-
Bulma Add Button Color Example:
<a class="button is-primary"> Button Primary </a> <a class="button is-link"> Button Link </a> <a class="button is-info"> Button Info </a> <a class="button is-success"> Button Success </a> <a class="button is-warning"> Button Warning </a> <a class="button is-danger"> Button Danger </a> |
If you run the above example it will produce output something like this-
Change Button Size
You can create small, medium or large buttons in Bulma. You can use the following classes to change size-
- is-small
- is-medium
- is-large
Bulma Change Button Size Example:
<a class="button is-primary is-small"> Button Small </a> <a class="button is-primary"> Button </a> <a class="button is-primary is-medium"> Button Medium </a> <a class="button is-primary is-large"> Button Large </a> |
If you run the above example it will produce output something like this-
Change Button Style/State
You can create outlined, loading, disabled buttons using the following class-
- is-outlined
- is-loading
- is-disabled
Button Style & State Example:
<a class="button is-danger is-outlined"> Button </a> <a class="button is-danger is-loading"> Button </a> <a class="button is-danger is-disabled" disabled> Button </a> |
Output of the above example will be-
Helpers
Following responsive classes are available which can be used easily anywhere-
-
is-clearfix
– Fixes an element’s floating children -
is-pulled-left
– Moves an element to the left -
is-pulled-right
– Moves an element to the right -
is-marginless
– Removes any margin -
is-paddingless
– Removes any padding -
is-overlay
– Completely covers the first positioned parent -
is-clipped
– Adds overflow hidden -
is-radiusless
– Removes any radius -
is-shadowless
– Removes any shadow -
is-unselectable
– Prevents the text from being selectable -
is-invisible
-Adds visibility hidden
Responsive Helpers
You can use the responsive helper to show/hide the content based on viewport of device.
Show
You can use following display classes-
-
block
-
flex
-
inline
-
inline-block
-
inline-flex
Hide Classes
You can use following classes to hide on specific devices-
-
is-hidden-mobile
– Hidden on Mobile devices. -
is-hidden-tablet-only
– Hidden only on Tablet. -
is-hidden-desktop-only
-Hidden only on desktop. -
is-hidden-widescreen-only
– Hidden on wide screen between 1216px and 1407px.
Typography Helpers
Advertisements
Add Comment
📖 Read More
- 1. Bulma Columns
- 2. Bulma Layout
- 3. Bulma Tiles
- 4. Bulma Form
- 5. Bulma File Upload
- 6. Bulma Box