v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Container

Consistent content width and responsive page gutters.

Interactive preview

A focused reading column.

Responsive gutters keep this content comfortable on small screens.

Usage

import { Container } from "@devvy-ui/react";

<Container size="sm"><p>A focused reading column.</p></Container>

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
sizesm | md | lg | fluidlgMaximum width; fluid fills the available space.

Accessibility & behavior

Platform Behavior & Guidelines

A layout div with native props and ref. It adds no landmark or keyboard behavior; compose semantic sections/headings inside it. Width and gutters are customizable through classes/style.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add container

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Container.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.