Skip to content
v0.2.10

Container

Centered content with token widths and logical gutters.

Preview

Content stays within a readable width.

Use Container

Container is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
container.tsxTSX
"use client";

import { FloodRoot, Container, Text } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Container size="md" gutter="6"><Text as="p">Content stays within a readable width.</Text></Container>
    </FloodRoot>
  );
}

Design notes

  • Max width includes gutters (border-box). Sizes sm/md/lg use relative semantic roles; full removes the maximum.
  • Native div props/ref target the container. Gutter uses Space; it does not add vertical spacing or breakpoints.
  • Available in 0.2.4; use matching installed declarations.

API reference

PropValuesDefault
size"sm" | "md" | "lg" | "full""lg"
gutter"0" | "1" | "2" | "3" | "4" | "6" | "8" | "12""6"
Native HTML propsHTMLAttributes<HTMLDivElement>Forwarded
View TypeScript source