Knit UI
GitHub

Playground

Loading playground…

false
Playground
<Container
  size="md"
  fluid={false}
/>

Examples

Sizes

All named sizes rendered sequentially to show each max-width cap.

Loading example…

SizesSourceStorybook

Fluid

Fluid mode — the container spans the full parent width regardless of size.

Loading example…

FluidSourceStorybook

Numeric Size

A numeric size value sets an arbitrary max-width in pixels.

Loading example…

Numeric SizeSourceStorybook

Page Layout

Realistic page layout — header, body copy and a footer inside a centered container.

Loading example…

Page LayoutSourceStorybook

Nested

Nested containers — an outer fluid wrapper with an inner size-capped container.

Loading example…

NestedSourceStorybook

Props

PropTypeDefaultDescription
disabled systemboolean | undefined
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size systemstring | number | undefined
xxs · xs · sm · md · lg · xl · xxl
mdCaps the max-width to a named breakpoint. Also accepts a raw number or CSS string.
theme systemThemeName | null | undefinedApplies a theme to this element
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 499 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.