Container

A responsive container component that centers content and constrains its maximum width based on breakpoints.

Import
import { Container } from "@sugarcoat/ui-nxt";
Usage
<Container size="md">
Your content here
</Container>

Basic Usage#

A container that centers content with responsive max-width.

Basic Container

Sizes#

The container size controls its maximum width, mapping to breakpoints.

Extra Small
Small
Medium
Large
Extra Large
2XL
Full

Page Layout Example#

Common pattern for page layouts with a container.

Page Layout

Nested Containers#

Containers can be nested for different content widths.

Nested Containers

Props#

PropTypeDefaultDescription
size"xs" | "sm" | "md" | "lg" | "xlg" | "2xl" | "full""md"Maximum width based on breakpoints
asElementType"div"Element type to render as
renderReactElement | Function-Custom render element or function
cssSystemStyleObject-Additional Panda CSS styles

Size Reference#

SizeMax Width
xsBreakpoint xs
smBreakpoint sm
mdBreakpoint md
lgBreakpoint lg
xlgBreakpoint xlg
2xlBreakpoint 2xl
full100% (no limit)
Customize Theme
Build your own sugarcoat/ui theme
PresetLime / Violet / Slate
Brand ColorLime
Accent ColorViolet
Gray ScaleSlate
Border RadiusLg