Skip to main content
Neighborhood Design System v5.1.0

Breakpoints

Breakpoints used in Neighborhood.

Breakpoints are the screen widths where layouts change. Each one applies from its width upward, so md covers 768px and wider. Components use the same widths, and the bpSm, bpMd, bpLg and bpXl endings on component tokens match sm through xl.

CSS can’t read a custom property inside a media query, so write the width itself in @media, using a value from the table:

@media (min-width: 768px) {
  .tile {
    grid-template-columns: 1fr 1fr;
  }
}

In JavaScript, read the width from the token package instead of typing it:

import tokens from '@fbin-web/neighborhood-tokens/dist/neighborhood.tokens.json' with { type: 'json' };

const desktop = window.matchMedia(`(min-width: ${tokens.breakpoint.lg.$value})`);

Properties

NameKeyTokenSizeClassification
extra smallxs--nbhd-breakpoint-xs≥ 375pxmobile
smallsm--nbhd-breakpoint-sm≥ 544pxmobile
mediummd--nbhd-breakpoint-md≥ 768pxtablet
largelg--nbhd-breakpoint-lg≥ 1024pxdesktop
extra largexl--nbhd-breakpoint-xl≥ 1200pxdesktop
extra extra largexxl--nbhd-breakpoint-xxl≥ 1300pxdesktop
Esc
↑ ↓ to move↵ to open