2016-09-11 11:00:49 +00:00
---
2017-07-29 12:02:00 +00:00
title: Hero
2016-09-11 11:00:49 +00:00
layout: documentation
2018-04-10 10:45:48 +00:00
hide_categories: true
2018-04-18 16:00:00 +00:00
hide_fortyfour: true
2016-09-11 11:00:49 +00:00
doc-tab: layout
doc-subtab: hero
2018-04-09 15:50:33 +00:00
breadcrumb:
- home
- documentation
- layout
- layout-hero
2018-04-18 16:00:00 +00:00
meta:
colors: true
sizes: true
2020-01-05 13:05:39 +00:00
variables: true
2016-09-11 11:00:49 +00:00
---
2018-04-18 16:00:00 +00:00
< div class = "content" >
< p >
The hero component allows you to add a < strong > full width banner< / strong > to your webpage, which can optionally cover the full height of the page as well.
< / p >
< p >
The basic requirement of this component are:
< / p >
< ul >
< li >
< code > hero< / code > as the main container
< ul >
< li >
< code > hero-body< / code > as a direct child, in which you can put all your content
< / li >
< / ul >
< / li >
< / ul >
< p >
2019-10-12 16:52:03 +00:00
For the < a href = "#fullheight-hero" > fullheight hero< / a > to work, you will also need a < code > hero-head< / code > and a < code > hero-foot< / code > .
2018-04-18 16:00:00 +00:00
< / p >
< / div >
2018-04-10 10:45:48 +00:00
{% include layout/main-close.html show_categories=true %}
2016-09-11 11:00:49 +00:00
< section class = "section is-fullwidth" >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Hero title
< / p >
< p class = "subtitle" >
Hero subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2018-04-09 15:33:44 +00:00
< / section >
2016-09-11 11:00:49 +00:00
{% highlight html %}
< section class = "hero" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
Hero title
< / h1 >
< h2 class = "subtitle" >
Hero subtitle
< / h2 >
< / div >
< / div >
< / section >
{% endhighlight %}
< / section >
< section class = "section" >
< div class = "container" >
2018-04-18 16:00:00 +00:00
{% include elements/anchor.html name="Colors" %}
2018-10-07 15:46:48 +00:00
< div class = "content" >
2020-02-12 10:47:44 +00:00
As with buttons, you can choose one of the < strong > 8 different colors< / strong > :
2018-10-07 15:46:48 +00:00
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / section >
< section class = "section is-fullwidth" >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-primary" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Primary title
< / p >
< p class = "subtitle" >
Primary subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
{% highlight html %}
< section class = "hero is-primary" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
Primary title
< / h1 >
< h2 class = "subtitle" >
Primary subtitle
< / h2 >
< / div >
< / div >
< / section >
{% endhighlight %}
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-info" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Info title
< / p >
< p class = "subtitle" >
Info subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-success" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Success title
< / p >
< p class = "subtitle" >
Success subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2020-02-12 10:47:44 +00:00
< div class = "bd-example" >
< section class = "hero is-link" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Link title
< / p >
< p class = "subtitle" >
Link subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-warning" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Warning title
< / p >
< p class = "subtitle" >
Warning subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-danger" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Danger title
< / p >
< p class = "subtitle" >
Danger subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-light" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Light title
< / p >
< p class = "subtitle" >
Light subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-dark" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Dark title
< / p >
< p class = "subtitle" >
Dark subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
< / section >
< section class = "section" >
< div class = "container" >
2018-04-18 16:00:00 +00:00
{% include elements/anchor.html name="Gradients" %}
2018-10-07 15:46:48 +00:00
< div class = "content" >
2016-09-11 11:00:49 +00:00
By adding the < code > is-bold< / code > modifier, you can generate a subtle < strong > gradient< / strong >
2018-10-07 15:46:48 +00:00
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / section >
< section class = "section is-fullwidth" >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-primary is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Primary bold title
< / p >
< p class = "subtitle" >
Primary bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
{% highlight html %}
< section class = "hero is-medium is-primary is-bold" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
Primary bold title
< / h1 >
< h2 class = "subtitle" >
Primary bold subtitle
< / h2 >
< / div >
< / div >
< / section >
{% endhighlight %}
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-info is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Info bold title
< / p >
< p class = "subtitle" >
Info bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-success is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Success bold title
< / p >
< p class = "subtitle" >
Success bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-warning is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Warning bold title
< / p >
< p class = "subtitle" >
Warning bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-danger is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Danger bold title
< / p >
< p class = "subtitle" >
Danger bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-light is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Light bold title
< / p >
< p class = "subtitle" >
Light bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-medium is-dark is-bold" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Dark bold title
< / p >
< p class = "subtitle" >
Dark bold subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
< / section >
< section class = "section" >
< div class = "container" >
2018-04-18 16:00:00 +00:00
{% include elements/anchor.html name="Sizes" %}
2018-10-07 15:46:48 +00:00
< div class = "content" >
< p >
You can have even more imposing banners by using one of < strong > 3 different sizes< / strong > :
< / p >
< ul >
< li >
medium
< / li >
< li >
large
< / li >
< li >
fullheight
< / li >
< / ul >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / section >
< section class = "section is-fullwidth" >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-primary is-medium" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Medium title
< / p >
< p class = "subtitle" >
Medium subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
{% highlight html %}
< section class = "hero is-primary is-medium" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
Medium title
< / h1 >
< h2 class = "subtitle" >
Medium subtitle
< / h2 >
< / div >
< / div >
< / section >
{% endhighlight %}
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-09-11 11:00:49 +00:00
< section class = "hero is-info is-large" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Large title
< / p >
< p class = "subtitle" >
Large subtitle
< / p >
< / div >
< / div >
< / section >
< / div >
{% highlight html %}
< section class = "hero is-info is-large" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
Large title
< / h1 >
< h2 class = "subtitle" >
Large subtitle
< / h2 >
< / div >
< / div >
< / section >
{% endhighlight %}
2019-10-12 16:52:03 +00:00
< div id = "fullheight-hero" class = "bd-example is-fullwidth" >
< section class = "hero is-success is-fullheight" >
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
Fullheight title
< / p >
< p class = "subtitle" >
Fullheight subtitle
< / p >
2016-09-11 11:00:49 +00:00
< / div >
2019-10-12 16:52:03 +00:00
< / div >
< / section >
< / div >
2016-09-11 11:00:49 +00:00
{% highlight html %}
< section class = "hero is-success is-fullheight" >
< div class = "hero-body" >
< div class = "container" >
< h1 class = "title" >
2018-10-07 15:46:48 +00:00
Fullheight title
2016-09-11 11:00:49 +00:00
< / h1 >
< h2 class = "subtitle" >
2018-10-07 15:46:48 +00:00
Fullheight subtitle
2016-09-11 11:00:49 +00:00
< / h2 >
< / div >
< / div >
< / section >
{% endhighlight %}
< / section >
2018-10-07 15:46:48 +00:00
<!-- Fullheight with navbar -->
< section class = "section" >
< div class = "container" >
{% include elements/anchor.html name="Fullheight with navbar" %}
< div class = "content" >
< p >
If you are using a < a href = "{{ site.url }}/documentation/components/navbar/#fixed-navbar" > fixed navbar< / a > , you can use the < code > is-fullheight-with-navbar< / code > modifier on the hero for it to occupy the viewport height minus the navbar height.
< / p >
< / div >
< / div >
< / section >
< div class = "bd-example is-fullwidth" >
{% include examples/navbar-basic.html %}
2018-10-07 15:55:10 +00:00
< section class = "hero is-link is-fullheight-with-navbar" >
2018-10-07 15:46:48 +00:00
< div class = "hero-body" >
< div class = "container" >
< p class = "title" >
2018-10-07 15:55:10 +00:00
Fullheight hero with navbar
2018-10-07 15:46:48 +00:00
< / p >
< / div >
< / div >
< / section >
< / div >
{% highlight html %}
2018-10-28 07:50:57 +00:00
< section class = "hero is-link is-fullheight-with-navbar" >
2018-10-07 15:46:48 +00:00
< div class = "hero-body" >
< div class = "container" >
2018-10-28 07:50:57 +00:00
< p class = "title" >
2018-10-07 15:55:10 +00:00
Fullheight hero with navbar
2018-10-28 07:50:57 +00:00
< / p >
2018-10-07 15:46:48 +00:00
< / div >
< / div >
< / section >
{% endhighlight %}
<!-- Fullheight with 3 parts -->
2016-09-11 11:00:49 +00:00
< section class = "section" >
< div class = "container" >
2018-10-07 15:46:48 +00:00
{% include elements/anchor.html name="Fullheight hero in 3 parts" %}
2016-09-11 11:00:49 +00:00
< div class = "content" >
2018-10-07 15:46:48 +00:00
< p > To obtain a hero that will cover the whole height of the viewport, you can split it in < strong > 3 vertical parts< / strong > :< / p >
2016-09-11 11:00:49 +00:00
< ul >
< li >
< code > hero< / code >
< ul >
< li > < code > hero-head< / code > (always at the top)< / li >
< li > < code > hero-body< / code > (always vertically centered)< / li >
< li > < code > hero-foot< / code > (always at the bottom)< / li >
< / ul >
< / li >
< / ul >
< / div >
< / div >
< / section >
2017-10-09 11:27:08 +00:00
{% capture heroNavbarA %}
2016-09-11 11:00:49 +00:00
< section class = "hero is-primary is-medium" >
2017-10-09 11:27:08 +00:00
<!-- Hero head: will stick at the top -->
2016-09-11 11:00:49 +00:00
< div class = "hero-head" >
2017-10-09 11:27:08 +00:00
< nav class = "navbar" >
2016-09-11 11:00:49 +00:00
< div class = "container" >
2017-10-09 11:27:08 +00:00
< div class = "navbar-brand" >
< a class = "navbar-item" >
< img src = "{{ site.url }}/images/bulma-type-white.png" alt = "Logo" >
2016-09-11 11:00:49 +00:00
< / a >
2020-12-09 15:44:40 +00:00
< span class = "navbar-burger" data-target = "navbarMenuHeroA" >
2017-10-09 11:27:08 +00:00
< span > < / span >
< span > < / span >
< span > < / span >
< / span >
2016-09-11 11:00:49 +00:00
< / div >
2017-10-09 11:27:08 +00:00
< div id = "navbarMenuHeroA" class = "navbar-menu" >
< div class = "navbar-end" >
< a class = "navbar-item is-active" >
Home
2016-09-11 11:00:49 +00:00
< / a >
2017-10-09 11:27:08 +00:00
< a class = "navbar-item" >
Examples
< / a >
< a class = "navbar-item" >
Documentation
< / a >
< span class = "navbar-item" >
< a class = "button is-primary is-inverted" >
< span class = "icon" >
2018-01-10 16:30:23 +00:00
< i class = "fab fa-github" > < / i >
2017-10-09 11:27:08 +00:00
< / span >
< span > Download< / span >
< / a >
< / span >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / div >
2017-10-09 11:27:08 +00:00
< / nav >
2016-09-11 11:00:49 +00:00
< / div >
<!-- Hero content: will be in the middle -->
< div class = "hero-body" >
< div class = "container has-text-centered" >
< h1 class = "title" >
Title
< / h1 >
< h2 class = "subtitle" >
Subtitle
< / h2 >
< / div >
< / div >
<!-- Hero footer: will stick at the bottom -->
< div class = "hero-foot" >
< nav class = "tabs" >
< div class = "container" >
< ul >
< li class = "is-active" > < a > Overview< / a > < / li >
< li > < a > Modifiers< / a > < / li >
< li > < a > Grid< / a > < / li >
< li > < a > Elements< / a > < / li >
< li > < a > Components< / a > < / li >
< li > < a > Layout< / a > < / li >
< / ul >
< / div >
< / nav >
< / div >
< / section >
2017-10-09 11:27:08 +00:00
{% endcapture %}
2016-09-11 11:00:49 +00:00
2017-10-09 11:27:08 +00:00
{% capture heroNavbarB %}
2016-09-11 11:00:49 +00:00
< section class = "hero is-info is-large" >
< div class = "hero-head" >
2017-10-09 11:27:08 +00:00
< nav class = "navbar" >
2016-09-11 11:00:49 +00:00
< div class = "container" >
2017-10-09 11:27:08 +00:00
< div class = "navbar-brand" >
< a class = "navbar-item" >
< img src = "{{ site.url }}/images/bulma-type-white.png" alt = "Logo" >
2016-09-11 11:00:49 +00:00
< / a >
2020-12-09 15:44:40 +00:00
< span class = "navbar-burger" data-target = "navbarMenuHeroB" >
2017-10-09 11:27:08 +00:00
< span > < / span >
< span > < / span >
< span > < / span >
< / span >
2016-09-11 11:00:49 +00:00
< / div >
2017-10-09 11:27:08 +00:00
< div id = "navbarMenuHeroB" class = "navbar-menu" >
< div class = "navbar-end" >
< a class = "navbar-item is-active" >
Home
2016-09-11 11:00:49 +00:00
< / a >
2017-10-09 11:27:08 +00:00
< a class = "navbar-item" >
Examples
< / a >
< a class = "navbar-item" >
Documentation
< / a >
< span class = "navbar-item" >
< a class = "button is-info is-inverted" >
< span class = "icon" >
2018-01-10 16:30:23 +00:00
< i class = "fab fa-github" > < / i >
2017-10-09 11:27:08 +00:00
< / span >
< span > Download< / span >
< / a >
< / span >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / div >
2017-10-09 11:27:08 +00:00
< / nav >
2016-09-11 11:00:49 +00:00
< / div >
< div class = "hero-body" >
< div class = "container has-text-centered" >
2017-10-09 11:27:08 +00:00
< p class = "title" >
2016-09-11 11:00:49 +00:00
Title
2017-10-09 11:27:08 +00:00
< / p >
< p class = "subtitle" >
2016-09-11 11:00:49 +00:00
Subtitle
2017-10-09 11:27:08 +00:00
< / p >
2016-09-11 11:00:49 +00:00
< / div >
< / div >
< div class = "hero-foot" >
< nav class = "tabs is-boxed is-fullwidth" >
< div class = "container" >
< ul >
2017-10-09 11:27:08 +00:00
< li class = "is-active" >
< a > Overview< / a >
< / li >
< li >
< a > Modifiers< / a >
< / li >
< li >
< a > Grid< / a >
< / li >
< li >
< a > Elements< / a >
< / li >
< li >
< a > Components< / a >
< / li >
< li >
< a > Layout< / a >
< / li >
2016-09-11 11:00:49 +00:00
< / ul >
< / div >
< / nav >
< / div >
< / section >
2017-10-09 11:27:08 +00:00
{% endcapture %}
2016-09-11 11:00:49 +00:00
2017-10-09 11:27:08 +00:00
{% capture heroNavbarC %}
2016-09-11 11:00:49 +00:00
< section class = "hero is-success is-fullheight" >
2017-10-09 11:27:08 +00:00
<!-- Hero head: will stick at the top -->
2016-09-11 11:00:49 +00:00
< div class = "hero-head" >
2017-10-09 11:27:08 +00:00
< header class = "navbar" >
2016-09-11 11:00:49 +00:00
< div class = "container" >
2017-10-09 11:27:08 +00:00
< div class = "navbar-brand" >
< a class = "navbar-item" >
< img src = "{{ site.url }}/images/bulma-type-white.png" alt = "Logo" >
2016-09-11 11:00:49 +00:00
< / a >
2020-12-09 15:44:40 +00:00
< span class = "navbar-burger" data-target = "navbarMenuHeroC" >
2017-10-09 11:27:08 +00:00
< span > < / span >
< span > < / span >
< span > < / span >
< / span >
2016-09-11 11:00:49 +00:00
< / div >
2017-10-09 11:27:08 +00:00
< div id = "navbarMenuHeroC" class = "navbar-menu" >
< div class = "navbar-end" >
< a class = "navbar-item is-active" >
Home
2016-09-11 11:00:49 +00:00
< / a >
2017-10-09 11:27:08 +00:00
< a class = "navbar-item" >
Examples
< / a >
< a class = "navbar-item" >
Documentation
< / a >
< span class = "navbar-item" >
< a class = "button is-success is-inverted" >
< span class = "icon" >
2018-01-10 16:30:23 +00:00
< i class = "fab fa-github" > < / i >
2017-10-09 11:27:08 +00:00
< / span >
< span > Download< / span >
< / a >
< / span >
< / div >
2016-09-11 11:00:49 +00:00
< / div >
< / div >
< / header >
< / div >
<!-- Hero content: will be in the middle -->
< div class = "hero-body" >
< div class = "container has-text-centered" >
< h1 class = "title" >
Title
< / h1 >
< h2 class = "subtitle" >
Subtitle
< / h2 >
< / div >
< / div >
<!-- Hero footer: will stick at the bottom -->
< div class = "hero-foot" >
< nav class = "tabs is-boxed is-fullwidth" >
< div class = "container" >
< ul >
< li class = "is-active" > < a > Overview< / a > < / li >
< li > < a > Modifiers< / a > < / li >
< li > < a > Grid< / a > < / li >
< li > < a > Elements< / a > < / li >
< li > < a > Components< / a > < / li >
< li > < a > Layout< / a > < / li >
< / ul >
< / div >
< / nav >
< / div >
< / section >
2017-10-09 11:27:08 +00:00
{% endcapture %}
< section class = "section is-fullwidth" >
2018-04-09 21:25:26 +00:00
{% include elements/snippet.html content=heroNavbarA horizontal=true more=true %}
{% include elements/snippet.html content=heroNavbarB horizontal=true more=true %}
{% include elements/snippet.html content=heroNavbarC horizontal=true more=true %}
2016-09-11 11:00:49 +00:00
< / section >
2018-04-09 15:33:44 +00:00
{% include layout/main-open.html %}
2018-04-18 16:00:00 +00:00
2018-10-07 15:46:48 +00:00
{% include elements/variables.html type='component' hide_content=true %}