Skip to main content
Neighborhood Design System v5.1.0

Container

Ready

Container is a layout wrapper component that provides max-width constraint and padding.

Preview

Open in Storybook (opens in new tab)

Code

Install
npm install @fbin-web/neighborhood-core
Import
import { NbhdContainer } from '@fbin-web/neighborhood-core';
Usage
<nbhd-container> [content/components] </nbhd-container>

Properties

PropertyAttributeTypeDefaultDescription
surfacesurfacenoneprimarysecondaryinverseinverse-secondarynoneThe surface theme of the container.

Slots

NameDescription
(default)The default slot content rendered inside the container wrapper.

CSS Parts

NameDescription
baseThe container wrapper element that holds the slotted content.
nbhd-container::part(base) {
  /* your styles */
}

CSS Properties

Set these on nbhd-container 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-container-bpLg-paddingInline--nbhd-container-bpMd-paddingInline48px
--nbhd-container-bpMd-paddingInline--nbhd-space-1248px
--nbhd-container-display—block
--nbhd-container-host-display—block
--nbhd-container-inlineSize—100%
--nbhd-container-marginBlock--nbhd-space-00px
--nbhd-container-marginInline—auto
--nbhd-container-maxInlineSize--nbhd-size-container-max1300px
--nbhd-container-minInlineSize--nbhd-size-container-min320px
--nbhd-container-paddingBlock--nbhd-space-00px
--nbhd-container-paddingInline--nbhd-space-624px
--nbhd-container-position—static

Dependencies

Used by

Esc
↑ ↓ to move↵ to open