Skip to main content
Neighborhood Design System v5.1.0

Hero Split

Ready

Component that contains either a video or image as a visual complement to the content.

Preview

Open in Storybook (opens in new tab)

Code

Install
npm install @fbin-web/neighborhood-core
Import
import { NbhdHeroSplit } from '@fbin-web/neighborhood-core';
Usage
<nbhd-hero-split>
  <nbhd-text
    slot="eyebrow"
    tag="div"
    variant="eyebrow"
    >Fringilla Mollis Parturient</nbhd-text
  >
  <nbhd-text
    slot="title"
    variant="title"
    tag="h2"
    >Cursus Condimentum Bibendum</nbhd-text
  >
  <nbhd-text
    slot="subtitle"
    tag="h3"
    variant="subtitle"
    >Vulputate Vestibulum</nbhd-text
  >
  <nbhd-text
    slot="content"
    tag="div"
    >Curabitur blandit tempus porttitor.</nbhd-text
  >

  <nbhd-cta
    variant="primary"
    slot="cta"
    href="go-to-this-page"
    css-class="fun-css-tracking-class"
    external
    aria-label="Learn more about this thingy">
    Learn More
  </nbhd-cta>

  <nbhd-text
    slot="note"
    tag="div"
    >This is a note - Nulla vitae elit libero, a pharetra augue.</nbhd-text
  >

  <nbhd-image
    slot="media"
    src="https://moen.widen.net/content/8luiiucngz/original/1800-workstation-sinks-jumbotron-L.png"
    alt="Fun ALT test for images">
  </nbhd-image>
</nbhd-hero-split>

Media Dimensions

Image widths are preset by the component, so width and height do not need to be provided on nbhd-image. When using provider="widen", images are resized to these widths. Height is auto, so images keep their original aspect ratio and are not cropped.

BreakpointDimensionAspect Ratio
Small (≤767px)375px x autoOriginal
Medium (≥768px)720px x autoOriginal
Large (≥1024px)720px x autoOriginal

Properties

PropertyAttributeTypeDefaultDescription
reversereversebooleanfalseReverse the layout so the media appears on the opposite side of the content.
shadowshadowbooleanfalseApply a shadow to the media block.
compactcompactbooleanfalseSet the component max-inline-size to --nbhd-size-container-max.
framedframedbooleanfalseWrap the split layout in a framed border container.
alignmentalignmentstartcenterendstartSet the text alignment for the content details.
contentAlignmentcontent-alignmentstartcenterendcenterAlign the content block within the split layout.
mediaRadiusmedia-radiusnonesmallmediumlargefullnoneApply a border radius to the media element.
mediaRadiusPatternmedia-radius-patterncontentallcontentChoose whether the radius applies to the content-facing corners only or across all corners.
surfacesurfacenoneprimarysecondaryinverseinverse-secondaryprimarySurface theme color for the component.
marginTopmargin-topnonesmallmediumlargenoneAdjust margin above the component.
none = 0
small = 24px
medium = 48px
large = 96px
marginBottommargin-bottomnonesmallmediumlargenoneAdjust margin below the component.
none = 0
small = 24px
medium = 48px
large = 96px
paddingToppadding-topdefaultnonesmallmediumlargedefaultAdjust padding to the top of the component.
default = component's top padding
none = 0
small = 24px
medium = 48px
large = 96px
paddingBottompadding-bottomdefaultnonesmallmediumlargedefaultAdjust padding to the bottom of the component.
default = component's bottom padding
none = 0
small = 24px
medium = 48px
large = 96px

Slots

NameDescription
eyebrowContent rendered above the title, typically a short label or kicker.
titlePrimary headline content for the split hero layout.
subtitleSupporting heading or secondary line beneath the title.
contentMain body copy for the detail column.
ctaCall-to-action content rendered within the detail area.
noteSecondary note or supporting text placed beneath the CTA.
mediaVisual media slot for the image or video content on the opposite side.

CSS Parts

NameDescription
—The outer
wrapper that hosts the component layout.
—The nested container element that constrains the component width.
—The framed wrapper applied when the framed property is enabled.
—The split flex layout container holding the detail and media columns.
—The text/content column of the hero split layout.
—The slotted eyebrow content area above the title.
—The slotted title content area.
—The slotted subtitle content area.
—The slotted body content area.
—The slotted CTA content area.
—The slotted note content area, styled as a standalone text block.
—The media column containing the image or video slot.
—The actual slotted media content area inside the media column.
nbhd-hero-split::part() {
  /* your styles */
}

CSS Properties

Set these on nbhd-hero-split or an ancestor to override the defaults. Token is the design token a default comes from and Value is what it resolves to in core Neighborhood; brands may override them. Properties that adapt to surface follow the light or inverse surface they sit on until you set them.

PropertyTokenValueDescription Copy
--nbhd-heroSplit-detail-bpLg-gutterMargin—5%—
--nbhd-heroSplit-detail-bpLg-gutterPadding--nbhd-space-00px—
--nbhd-heroSplit-detail-bpLg-inlineSize—42%—
--nbhd-heroSplit-detail-bpMd-gutterPadding--nbhd-space-1664px—
--nbhd-heroSplit-detail-bpXl-gutterMargin—9%—
--nbhd-heroSplit-detail-bpXl-inlineSize—45%—
--nbhd-heroSplit-detail-edge--nbhd-space-00px—
--nbhd-heroSplit-detail-gutterMargin--nbhd-space-00px—
--nbhd-heroSplit-detail-gutterPadding--nbhd-space-1144px—
--nbhd-heroSplit-detail-inlineSize—100%Inline size (width) of the detail section, responsive to screen size.
--nbhd-heroSplit-detail-marginInlineEnd—Set by the component—
--nbhd-heroSplit-detail-marginInlineStart—Set by the component—
--nbhd-heroSplit-detail-paddingBlockEnd—Set by the component—
--nbhd-heroSplit-detail-paddingBlockStart—Set by the component—
--nbhd-heroSplit-detail-textAlign—start—
--nbhd-heroSplit-frame-borderColor--nbhd-context-color-accent-primaryAdapts to surface—
--nbhd-heroSplit-frame-borderRadius--nbhd-border-radius-md6pxBorder radius for the frame container.
--nbhd-heroSplit-frame-borderStyle—solid—
--nbhd-heroSplit-frame-borderWidth--nbhd-border-width-emphasis2px—
--nbhd-heroSplit-frame-paddingBlock--nbhd-space-624pxBlock padding (top and bottom) for the frame container.
--nbhd-heroSplit-frame-paddingInline--nbhd-space-624pxInline padding (left and right) for the frame container.
--nbhd-heroSplit-host-display—block—
--nbhd-heroSplit-marginInline--nbhd-space-00pxInline margin for the main hero-split container.
--nbhd-heroSplit-maxInlineSize—100%Maximum inline size (width) of the hero-split container.
--nbhd-heroSplit-media-borderEndEndRadius--nbhd-border-radius-none0—
--nbhd-heroSplit-media-borderEndStartRadius--nbhd-border-radius-none0—
--nbhd-heroSplit-media-borderRadius-default--nbhd-border-radius-none0—
--nbhd-heroSplit-media-borderRadius-full--nbhd-border-radius-full9999px—
--nbhd-heroSplit-media-borderRadius-large--nbhd-border-radius-lg12px—
--nbhd-heroSplit-media-borderRadius-medium--nbhd-border-radius-md6px—
--nbhd-heroSplit-media-borderRadius-small--nbhd-border-radius-sm2px—
--nbhd-heroSplit-media-borderStartEndRadius--nbhd-border-radius-none0—
--nbhd-heroSplit-media-borderStartStartRadius--nbhd-border-radius-none0—
--nbhd-heroSplit-media-boxShadow--nbhd-shadow-nonenone—
--nbhd-heroSplit-media-bpLg-maxInlineSize—720px—
--nbhd-heroSplit-media-display—block—
--nbhd-heroSplit-media-inlineSize—100%—
--nbhd-heroSplit-media-maxInlineSize—100%—
--nbhd-heroSplit-media-overflow—hidden—
--nbhd-heroSplit-media-reverse-shadow--nbhd-shadow-lg-reverse20px 10px 20px rgb(from #000000 r g b / 0.15)—
--nbhd-heroSplit-media-shadow--nbhd-shadow-lg-20px 10px 20px rgb(from #000000 r g b / 0.15)Box shadow for the media block when the shadow attribute is set. Reversed layouts use --nbhd-heroSplit-media-reverse-shadow (var(--nbhd-shadow-lg-reverse)).
--nbhd-heroSplit-note-borderColor--nbhd-context-color-accent-primaryAdapts to surface—
--nbhd-heroSplit-note-borderStyle—solidBorder style for the note text element's inline-start border.
--nbhd-heroSplit-note-borderWidth--nbhd-border-width-emphasis2pxBorder width for the note text element's inline-start border.
--nbhd-heroSplit-note-fontSize--nbhd-typography-bodySmall-fontSize0.875remFont size for the note text element.
--nbhd-heroSplit-note-fontStyle—italicFont style for the note text element.
--nbhd-heroSplit-note-fontWeight--nbhd-typography-bodySmall-fontWeight400—
--nbhd-heroSplit-note-letterSpacing—normal—
--nbhd-heroSplit-note-lineHeight—normal—
--nbhd-heroSplit-note-marginBlock--nbhd-space-1248pxBlock margin for the note text element.
--nbhd-heroSplit-note-paddingInline--nbhd-space-416pxInline padding for the note text element.
--nbhd-heroSplit-paddingBlock--nbhd-space-1040pxBlock padding (top and bottom) for the hero-split container.

Dependencies

Child components <nbhd-hero-split> renders internally. Import them too when you tree-shake.

Esc
↑ ↓ to move↵ to open