Skip to main content
Neighborhood Design System v5.1.0

Headline Content

Ready

Headline Content is a designed to contain brief introductory content that is centered aligned by default.

Storybook docs (opens in new tab)

Preview

Open in Storybook (opens in new tab)

Code

Install
npm install @fbin-web/neighborhood-core
Import
import { NbhdHeadlineContent } from '@fbin-web/neighborhood-core';
Usage
<nbhd-headline-content id="nbhd-headlineContent">
  <nbhd-text
    slot="eyebrow"
    variant="eyebrow"
    tag="div">
    Fringilla Mollis Parturient
  </nbhd-text>
  <nbhd-text
    slot="title"
    variant="title"
    tag="h2"
    >Headline Content Title</nbhd-text
  >
  <nbhd-text
    slot="subtitle"
    variant="subtitle"
    tag="h3"
    >Vulputate Vestibulum</nbhd-text
  >
  <nbhd-text
    slot="content"
    tag="div">
    <p>Curabitur blandit tempus porttitor.</p>
  </nbhd-text>
  <nbhd-cta
    slot="cta"
    href="/go-to-this-page"
    aria-label="Learn more about this"
    css-class="fun-css-tracking-class">
    Learn More
  </nbhd-cta>
</nbhd-headline-content>

Properties

PropertyAttributeTypeDefaultDescription
compactcompactbooleanfalseLimits the component to a max inline size of --nbhd-size-container-max and centers its layout.
surfacesurfacenoneprimarysecondaryinverseinverse-secondaryprimarySets the surface treatment applied to the component background and inherited text styles.
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
eyebrowOptional short label rendered above the title, typically used for a category or intro label.
titlePrimary headline content rendered as the main title of the component.
subtitleSecondary supporting heading displayed beneath the main title.
contentMain body copy or supporting text block placed beneath the subtitle.
ctaOptional call-to-action content rendered after the body copy.

CSS Parts

NameDescription
baseThe root section element that wraps the headline content layout.
base-containerThe inner container element that holds the slotted headline content.
eyebrowThe slotted eyebrow label area rendered above the title.
titleThe slotted primary title area.
subtitleThe slotted supporting subtitle area.
contentThe slotted body content area.
ctaThe slotted call-to-action area.
nbhd-headline-content::part(base) {
  /* your styles */
}

CSS Properties

Set these on nbhd-headline-content 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.

PropertyTokenValue Copy
--nbhd-headlineContent-content-display—block
--nbhd-headlineContent-content-marginInline—auto
--nbhd-headlineContent-content-maxInlineSize—28.125rem
--nbhd-headlineContent-host-display—block
--nbhd-headlineContent-inlineSize—100%
--nbhd-headlineContent-marginInline--nbhd-space-00px
--nbhd-headlineContent-maxInlineSize—100%
--nbhd-headlineContent-minInlineSize--nbhd-size-container-min320px
--nbhd-headlineContent-paddingBlock--nbhd-space-10 --nbhd-space-1240px 48px
--nbhd-headlineContent-paddingInline--nbhd-space-00px
--nbhd-headlineContent-textAlign—center

Dependencies

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

Esc
↑ ↓ to move↵ to open