Hero

Info alert:Beta feature

This beta component is currently under review and is still open for further evolution. It is available for use in product. Beta components are considered for promotion on a quarterly basis. Please join in and give us your feedback or submit any questions on the PatternFly forum or via Slack. To learn more about the process, visit our about page or our Beta components page on GitHub.

Examples

Basic

If you need finer control over the placement of text content within the <Hero>, such as when you omit a background image, adjust the bodyWidth and bodyMaxWidth properties. Be mindful of using these properties when a background image is still present and ensure there is sufficient contrast between text and any part of the image that it overlaps.

When using gradientLight or gradientDark to apply gradient backgrounds, check the color contrast to ensure proper accessibility.

Basic hero content

Props

Hero

The main Hero component that allows adjusting of its background images and gradients in different color modes (such as light and dark).
*required
NameTypeDefaultDescription
hasNoGlassNo type infofalse

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v6-c-hero--pf-v6-c-hero--PaddingBlockStart
2rem
.pf-v6-c-hero--pf-v6-c-hero--PaddingBlockEnd
2rem
.pf-v6-c-hero--pf-v6-c-hero--PaddingInlineStart
4rem
.pf-v6-c-hero--pf-v6-c-hero--PaddingInlineEnd
2rem
.pf-v6-c-hero--pf-v6-c-hero--gradient--angle
109deg
.pf-v6-c-hero--pf-v6-c-hero--gradient--stop-1--light
transparent
.pf-v6-c-hero--pf-v6-c-hero--gradient--stop-2--light
transparent
.pf-v6-c-hero--pf-v6-c-hero--gradient--stop-3--light
transparent
.pf-v6-c-hero--pf-v6-c-hero--gradient--stop-1--dark
transparent
.pf-v6-c-hero--pf-v6-c-hero--gradient--stop-2--dark
transparent
.pf-v6-c-hero--pf-v6-c-hero--gradient--stop-3--dark
transparent
.pf-v6-c-hero--pf-v6-c-hero--BackgroundColor
(In light theme) #ffffff
.pf-v6-c-hero--pf-v6-c-hero--BackdropFilter
none
.pf-v6-c-hero--pf-v6-c-hero--BackgroundImage--light
none
.pf-v6-c-hero--pf-v6-c-hero--BackgroundImage--dark
none
.pf-v6-c-hero--pf-v6-c-hero--BackgroundRepeat
no-repeat
.pf-v6-c-hero--pf-v6-c-hero--BackgroundPosition
right center
.pf-v6-c-hero--pf-v6-c-hero--BackgroundSize
contain
.pf-v6-c-hero--pf-v6-c-hero--BorderStyle
solid
.pf-v6-c-hero--pf-v6-c-hero--BorderBlockStartWidth
1px
.pf-v6-c-hero--pf-v6-c-hero--BorderBlockEndWidth
1px
.pf-v6-c-hero--pf-v6-c-hero--BorderInlineStartWidth
1px
.pf-v6-c-hero--pf-v6-c-hero--BorderInlineEndWidth
1px
.pf-v6-c-hero--pf-v6-c-hero--BorderColor
(In light theme) #c7c7c7
.pf-v6-c-hero--pf-v6-c-hero--m-glass--BorderColor
(In light theme) #ffffff
.pf-v6-c-hero--pf-v6-c-hero--m-glass--BoxShadow
0px 4px 9px 0px rgba(41, 41, 41, 0.1500)
.pf-v6-c-hero--pf-v6-c-hero--BorderStartStartRadius
24px
.pf-v6-c-hero--pf-v6-c-hero--BorderStartEndRadius
72px
.pf-v6-c-hero--pf-v6-c-hero--BorderEndEndRadius
24px
.pf-v6-c-hero--pf-v6-c-hero--BorderEndStartRadius
72px
.pf-v6-c-hero--pf-v6-c-hero__body--Width
800px
.pf-v6-c-hero--pf-v6-c-hero__body--MaxWidth
80%
:root:where(.pf-v6-theme-glass) .pf-v6-c-hero--pf-v6-c-hero--BorderColor
(In light theme) #ffffff