Const
<!-- Basic hero -->
<umd-element-hero>
<h1 slot="headline">Welcome to Maryland</h1>
<p slot="text">Fearlessly Forward</p>
<img slot="image" src="campus.jpg" alt="Campus view">
</umd-element-hero>
<!-- Overlay hero with video -->
<umd-element-hero data-display="overlay" data-theme="dark">
<p slot="eyebrow">Discover</p>
<h1 slot="headline">Your Future Starts Here</h1>
<p slot="text">Join a community of innovators and leaders</p>
<video slot="video" autoplay muted loop>
<source src="campus-video.mp4" type="video/mp4">
</video>
<div slot="actions">
<a href="/apply">Apply Now</a>
<a href="/visit">Plan Your Visit</a>
</div>
</umd-element-hero>
<!-- Stacked hero with small height and large horizontal spacing -->
<umd-element-hero data-display="stacked" data-layout-height="small" data-layout-space-horizontal="large" data-layout-position="80">
<h1 slot="headline">Research Excellence</h1>
<p slot="text">Advancing knowledge through groundbreaking research</p>
<img slot="image" src="research-lab.jpg" alt="Research laboratory">
</umd-element-hero>
Base Hero Component
A versatile hero component with multiple layout options for page headers. Supports various content arrangements and visual styles.
Custom Element
<umd-element-hero>
Slots
eyebrow
- Small text above headlineheadline
- Main hero heading (required)text
- Supporting text contentimage
- Hero imagevideo
- Hero videoactions
- Call-to-action buttons/linksAttributes
data-display
- Display type options:standard
- Standard hero layout (default)stacked
- Stacked content layoutoverlay
- Content overlaid on image/videodata-layout-space-horizontal
- Horizontal spacing options:large
- Large horizontal spacing (see https://designsystem.umd.edu/foundation/horizontal-spacing)data-layout-height
- Layout height options:small
- Smaller layout heightdata-layout-text
- Text alignment options:center
- Center align textdata-theme
- Theme options:dark
- Dark theme stylingdata-feature
- Feature options:animation
- Enable animationsdata-layout-position
- Sticky position offset in pixels (e.g.,80
for 80px from top)Deprecated Attributes
The following attributes are deprecated and will be removed in v2.0:
type="default-centered"
→ Usedata-display="standard" data-layout-text="center"
type="default-interior"
→ Usedata-display="standard" data-layout-height="small"
type="default-interior-centered"
→ Usedata-display="standard" data-layout-height="small" data-layout-text="center"
type="stacked"
→ Usedata-display="stacked"
type="stacked-interior"
→ Usedata-display="stacked" data-layout-height="small" data-layout-space-horizontal="large"
type="overlay"
→ Usedata-display="overlay"
data-visual-align="center"
→ Usedata-layout-text="center"