Hero

The Hero component provides a reusable pattern for hero in the interface.

Small hero

Renders a small hero area.

Donec ullamcorper nulla non.

Aenean lacinia bibendum nulla sed consectetur, egestas eget quam.

Normal hero

Renders a normal hero area.

Donec ullamcorper nulla non metus auctor fringilla.

Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras justo odio, dapibus ac facilisis in, egestas eget quam.

Large hero

Renders a large hero area.

Donec ullamcorper nulla non metus auctor fringilla.

Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras justo odio, dapibus ac facilisis in, egestas eget quam.

Large hero (Without text)

Renders a large hero area, without text. Overlay should not be visible.

With content background color

Renders a hero with a background color for the content area.

Donec ullamcorper nulla.

Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.

Content alignment

Renders a hero with a content aligned horizontal "center" and vertical "center".

Donec ullamcorper nulla.

Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.

Text alignment

Renders a hero with text aligned center.

Donec ullamcorper nulla.

Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.

Button

Renders a hero with a button.

Donec ullamcorper nulla.

Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.

Button

Multi column hero

Renders a normal multi column area.

This is a title

Nullam quis risus eget urna mollis ornare vel eu leo. Maecenas sed diam eget risus varius blandit sit amet non magna. Etiam porta sem malesuada magna mollis euismod. Donec ullamcorper nulla non metus auctor fringilla.

Hero with call to actions

Renders a normal hero area with call to actions.

Donec ullamcorper nulla non metus auctor fringilla.

Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.

Stretch hero

Renders a hero with stretch enabled, making it fill the full viewport height.

Donec ullamcorper nulla non metus auctor fringilla.

Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.

API

Parameter Default Description
false Background image
[] Where to focus in the background.
false Display a video as a background. This option will replace image.
normal Ratio (normal, large)
The title text
The byline text
The body text.
false Always stretch the hero vertically. Makes the hero the width of the viewport. Requires a centered container.
false Name of the animation
Hero Label provided for accessibility tools such as screen readers
default Select which view to display
false An array containing the custom data for the selected view (heroView).
false The meta text
false Image or a color
The color of the text.
left Alignment texts. Supports "left", "center" and "right".
The background color for texts in the content area.
bottom Vertical placement of the content: top|center|bottom.
left -
true Apply rounded corners to content if contentBackgroundColor is set.
true Apply shadows to content if contentBackgroundColor is set.
[] Add a @button by passing @button component arguments. If button is treated as a link, all te text elements in the content gets wrapped with this link.
false Poster image for the video
Add an overlay over an image to make text more legible
false Content slot to be displayed in the hero

CSS API

Variable Default Type Values Description
var(--base) range - Main unit that drives radius and spacing scales.
var(--border-radius) range - Border Radius
var(--color--primary) color - Primary
var(--corner-shape) select square, round, squircle, circular, bevel, scoop Corner Shape
var(--font-size-100) range - Base font size.
var(--font-size-300) range - Two steps above base in the type scale. Equivalent to h5.
var(--font-size-500) range - Four steps above base in the type scale. Equivalent to h3.
var(--space) range - Base spacing unit. Used for padding and margin inside components.
var(--color--alpha) rgba - Used for overlays. Includes opacity — set both color and alpha together.
var(--shadow-color) rgba - Shadow Color
var(--shadow-amount) range - Multiplier for elevation shadows. 0 = none, 1 = default.
var(--color--alpha-contrast) color - Used for text and icons on alpha overlays.
var(--color--primary-contrast) color - Primary Contrast

Similar components