---
title: Hero
layout: docs
theme: library
fullwidth: true
hide_categories: true
hide_fortyfour: true
doc-tab: layout
doc-subtab: hero
breadcrumb:
- home
- documentation
- layout
- layout-hero
meta:
colors: true
sizes: true
variables: true
---
The hero component allows you to add a full width banner to your webpage, which can optionally
cover the full height of the page as well.
The basic requirement of this component are:
-
hero
as the main container
hero-body
as a direct child, in which you can put all your content
For the fullheight hero to work, you will also need a hero-head
and a
hero-foot
.
{% capture hero_example %}
You can have even more imposing banners by using one of
5 different sizes:
is-small
is-medium
is-large
is-halfheight
is-fullheight
{% capture small_hero %}
If you are using a
fixed navbar, you can use the
is-fullheight-with-navbar
modifier on the hero for it to occupy the viewport height minus the navbar
height.
{% capture fullheight_with_navbar_example %} {% include
docs/examples/navbar-basic.html %}
To obtain a hero that will cover the whole height of the viewport, you can split it in
3 vertical parts:
-
hero
hero-head
(always at the top)
hero-body
(always vertically centered)
hero-foot
(always at the bottom)
{% capture heroNavbarA %}