Bonusway design system

Layout

Container

The fixed content measure, centred with the page gutters. One per band — pages in the (content) route group get theirs from the group layout and should not add another.

import Container from '@/components/ui/Container';

Source: src/components/ui/Container.tsx

Examples

md and lg

md is the product measure. lg is for pages that need more room — the design system itself uses lg, which is why this page is wider than a store page.

size="md" — the default measure
size="lg"

Props

<Container> props

PropTypeDefaultDescription
asElementType'div'—
size'md' | 'lg''md'—
childrenrequiredReactNode——

Also accepts everything in HTMLAttributes<HTMLElement> — so native attributes (id, onClick, aria-*, data-*) pass straight through.

Usage

Do

  • Let the route-group layout provide it for ordinary pages.

Don’t

  • Don’t nest a Container in a Container — the gutters double and the content narrows for no reason.
  • Don’t use it to centre a single card; that is `mx-auto max-w-[…]` on the card.

Related:SectionGrid

Šī lapa lieto sīkfailus

Mēs izmantojam sīkfailus, lai uzlabotu tavu pieredzi mūsu vietnē un pielāgotu saturu, ko mēs tev piedāvājam. Būtiski sīkfaili ir nepieciešami, lai mūsu pakalpojums darbotos pareizi. Ja esi priecīgs, ka mēs apkopojam informāciju, izmantojot mārketinga sīkdatnes, tad izvelies “Pieņemt visu”. Vienmēr vari mainīt minētos iestatījumus, apmeklējot sīkfailu iestatījumus.

Sīkfailu iestatījumi