John Dee johndee@example.com 31m
Hi My Name is John Dee and i am from London.
Category Archives: Bulma Tutorial
Bulma Box
Bulma Box– Bulma Css Box is basically simple container which can contain other elements. Class .box is used to create box container in Bulma. Here in this article we are going to explain how you can create box in Bulma. You can use our online editor to edit and run the code online.
Bulma Box Example
Add class .box to create simple container with shadow, border and border radius. You can use it widely for display rich contents such as media object. Here is simple example of box.
If you run the above example it will produce output something like this-
Bulma Box Example:
|
If you run the above example it will produce output something like this-
Video Demo
You can run video demo to see the output of the above example-
Bulma File Upload
Bulma File Upload– Bulma Css provides classes to create beautiful file upload input field. It does not uses JavaScript. Here in this article, we are going to explain how you can create file upload input field in Bulma.
Bulma File Upload Example
To create basic input file upload you need to wrap input file field by div container with class file. Add label using class label. Add icon to show upload button. Here is an example-
If you run the above example it will produce output something like this-
Modifiers
We can use modifiers with Bulma file upload, Like if want to show placeholder for input file.
Show Placeholder
Using .has-name modifier with .file-name you can show the placeholder for selected file.
Full Width File Upload
Add modifier is-fullwidth to make fullwidth file upload.
Box Styled
You can add box style by adding is-boxed modifier.
If you run the above example it will produce output something like this-
Colors
You can use color modifiers to change the color of input file upload.
Sizes
You can use size modifiers to change the size of input file field. Following sizes are available-
- .is-small
- .is-medium
- .is-large
Example
On the same way you can use other size modifiers.
Bulma Form
Bulma Form – Bulma Css provides form controls to create beautiful form. Here in this article we are going to explain how to create form controls. You can use our online editor to edit and run the code online.
Bulma Form Example
Following topics are covered in this tutorial-
- Input
- Textarea
- Select
- Checkbox
- Radio
- File
Input
To create a simple input box add class input to input box.
If you run the above example it will produce output like this –
Input Color
We can use color modifiers to change the input color for example – is-primary, is-info.
If you run the above example it will produce output something like this-
Input Size
Following sizes are available for input box-
- Small Input
- Normal Input
- Medium Input
- Large Input
Input States
Following states are available-
- Normal
- Hover
- Focus
- Loading
The output of above example will be –
Textarea
class=”textarea” is used to create textarea in Bulma.
Textarea Colors
You can change the textarea color using the modifier classes.
If you run the above example it will produce output something like this-
Textarea Sizes
You can change the size of textarea by adding the modifier classes. Following sizes are available-
- Small– To create Small Textarea Add modifier class – is-small
- Normal– By default textareas are normal in bulma so you don’t need to add anything.
- Medium Add class is-medium to create medium textarea.
- Large– To create large textarea add class is-large.
Textarea State
You can add following states in textarea by adding modifer classes-
- Hover – Add class is-hovered for hover effect.
- Focused– Add class is-focused to show focused state of textarea.
- Loading– Add class is-loading to show the loading state.
Disabled Textarea
If you want to create disabled textarea add attribute – disabled. Here is an example of disabled textarea.
Select Dropdowm
Wrap form select element by class=”select” it will add the style to default select box.
Out of above example-
Multi Select Dropdown
By adding the modifier class is-multiple, you can change the style of default muli select dropdown.
Bulma Multi Select Drop down Example:
|
Select Dropdown Colors
You can use modifiers classes to change the dorpdown colors. In the below example we have used color modifier class – is-primary to change the dropdown menu color.
Add Icon to Select Dropdown
You can add icon to select dropdown menu. Here is an example of icon-
The output of above example will look something like this-
Checkbox
To style checkbox wrap the default checkbox by label class=”checkbox”.
Radio Button
You can create radio button simply as below-
Bulma Tiles
Bulma Tiles– Bulma Css provides classes to create two-dimensional elements called tiles. You can create beautiful tiles layout using these classes. Here in this article we are going to explain the tiles with different-different examples.
Bulma Tiles Example
Let us create very basic tile. Create an element with class title and then add child elements. Here is an example-
If yo run the above example it will produce the output something like this.
Modifiers
Tiles has following modifiers-
- 3 Contextual
is-ancestor
is-parent
is-child - 1 Directional
is-vertical - 12 horizontal Size
is-1 to is-12– You can use any size like – is-1, is-2, is-3, is-4…..is-12.
Nested Tiles
You can create nested tiles using the class- tiles.
If You run the above example it will look something like this –
Bulma Layout
Bulma Layout Bulma Css provides various classes that can be used to create layout such as – container, media object, section and footer etc. Here in this tutorial,we are going to explain each topics with example and demo.
Bulma Layout | Container | Section
Following topics are covered in this tutorial-
- Container
- Level
- Media Object
- Hero
- Section
- Footer
- Tiles
Container
.container class is used to create container. Container class can be used anywhere but it mostly used direct child of navbar, hero, section and footer.
If you run the above example it will produce the output something like this-
- On Desktop– On Desktop maximum width is 960px and it will be horizontally centered.
- On Widescreen– On widescreen maximum width is 1152px.
- On Full Hd– On Full Hd maximum width will be 1344px.
Fluid Container
If you want to create a container of full width with 24px margin on left and right side add class is-fluid to container.
Fluid Container Example:
|
If you run the above exmaple it will produce output something like this-
Breakpoint Containers
Using modifiers – .is-widescreen and .is-fullhd we can create fullwidth container until the specific breakpoints.
Level
Level is basically container which can contain any other element.
To create level you need to create a wrapper element with class – .level then add container with class .level-left and .level-right and then add level item by adding class .level-item.
If you run the above example it will produce output something like this-
Centered Level
If you want to make the level text centered add the class- has-text-centered to the level item container.
If you run the above example it will produce output something like this-
Media Object
Bulma provides classes to create media object. Media object is basically ui element that is used for repeatable content.
Hero
Bulma provides classes to create Hero banners which can be used to showcase something. Class hero and hero-body is used to create hero banner.
On the same way you can change the background color of Hero banner using modifier classes.
If you run the above example it will produce output something like this-
Colored Hero Banner
You can watch this video for demo-
Sections
Section is basically a container that is used to divide page into parts. Sections are directly used as child of body.
My Section
This is simple container.
Footer
Bulma provides footer class to create responsive footer. Footer can contain lists, columns, icons and buttons etc.
Bulma Columns
Bulma Columns– Bulma Css provides simple classes to create responsive columns. It is very easy to create responsive columns in Bulma. Here in this article we are going to explain how you can column container and column class to create responsive columns. You can also use our online editor to edit and run the code online.
Bulma Columns
This Article contains the following topics-
- Basics
- Sizes
- Responsiveness
- Nesting
- Gap
- Options
1. Basics
To create column layout you need to create column container and then add as many container as you want. Here is simple example of column layout.
If you run the above example it will produce output something like this-
You can as many columns you want there is no limitation on it, Bulma will automatically handle the columns on all devices.
2. Sizes
There are various classes available that we can use to change the size of column.
is-three-quarters
is-two-thirds
is-half
is-one-third
is-one-quarter
is-four-fifths
is-three-fifths
is-two-fifths
is-one-fifth
The columns will occupy the space as class name example -is-half ie. half width of the container. Other columns will automatically manage and adjust in remaining space.
Let us create simple example to understand the above classes.
Change Column Size Classes Example:
|
If you run the above example it will produce output something like this-
12 Columns Grid System
Bulma Also provides classes to create 12 column grid system. Following classes are available to create grid.
is-2
is-3
is-4
is-5
is-6
is-7
is-8
is-9
is-10
is-11
Now let us create simple example to understand the grid system.
12 Columns Grid Example:
|
If you run the above example it will produce output something like this-
Offset
You can use offset classes to add offset to the columns.
is-offset-x
– Where x is number for example – is-offset-2, is-offset-3, is-offset-8, is-offset-11 etc.is-offset-one-fifth
is-offset-one-quarter
is-offset-one-quarter
Column Offset Example:
|
Narrow Columns
If want to create a column to occupy the space that it really needs, use is-narrow
modifier class.
Narrow Column Example:
|
Following Narrow Modifiers are available-
- is-narrow-mobile
- is-narrow-tablet
- is-narrow-desktop
Responsiveness
There are some classes that can be used to handle the responsiveness of the application.
Mobile Columns
By default columns on mobile devices are stacked on each other. To work columns on mobile add the class is-mobile.
Mobile Columns Example:
|
Now the above columns will work on mobile devices also.
Desktop Columns
If you want columns to work on desktop upwards use is-desktop class.
Desktop Columns Example:
|
3. Nesting Columns
We can create nested columns by adding column container and columns inside another column.
Nested Columns Example:
|
Gap
Bulma provides classes to manage the gaps between the columns.
Default Gap
By default columns have gap with 0.75rem on each side hence gap between two columns is 1.5rem.
Gapless Columns
We can remove the column gaps using modifier class is-gapless.
Remove Space Between Columns Example:
|
is-multiline is used to combine the columns.
No gapNo gap
Variable Gap
If you want to add variable gaps, use the following classes-
is-0
is-1
is-2
is-3
is-4
is-5
is-6
is-7
is-8
Example
No gapNo gap
Note: Please Add is-variavle class to add the variable gap.
Column Options
Multiline
You can use is-multiline modifier to add more column elements that will fit in single row.
Centering Column
You can use the is-centered class to center align the columns in Bulma.
is-half
is-narrow
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:
Button Primary Button Link Button Info Button Success Button Warning Button Danger |
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
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
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
Bulma Installation
Bulma Installation Steps– It is very simple to install Bulma Css. There are many ways to install Bulma css. Here in this tutorial, we are going to explain the installation steps. You can also use starter template to start quickly.
Bulma Installation Steps
You can get started with Bulma Css using the one of following method-
1. Using Npm
Using Npm you can install Bulma Package simply as below-
Install Bulma Npm command
npm install bulma |
2. Using Hosted CDN
You can also use hosted CDN to include Bulma css. Add the following url in head to include Bulma css.
Bulma CSS CDN Url:
|
3. Install Locally
If you want to install Bulma locally just download files from https://github.com/jgthms/bulma/tree/master/css and include in head.
If you want to use the icons with Bulma please include font-awesome.
Quick Start
You can start with Bulma using the starter template-
If you run the above example it will produce output something like this-
Bulma Tutorial
Bulma Tutorial– Bulma is Open source Modern Css framework which is lightweight, responsive & moduler. Bulma is 100% responsive and designed for mobile first, it is based on Flexbox.
Bulma Tutorial Step By Step
Here in this tutorial, we are going to cover each topic of Bulma framework with various examples & demo.
Bulma Features
- Responsive– This framework is 100% responsive which works across all devices.
- Mobile First– This is designed keeping mobile first.
- Moduler– This is built on modular approach so just import the part that you want to use for example – if you want to use only Bulma buttons just import buttons as-
@import "bulma/sass/elements/button.sass"
- Modern– This is modern framework and built with Flexbox.
- Free And Open Source– This framework is fully opensource and free to use.
What You Should Know?
Before starting you should have basic knowledge of HTML and CSS.