Container

Sitecore Content SDK atom: flex layout container configured by the first breakpoints entry. Supports column counts, stacking, gap, and nested Container children.

Arrange a section

Split a row into columns, stack regions vertically, and nest another layout when a column needs its own flow.

Columns

Equal shares, or a list of widths when the split should be uneven.

Direction

Row places children side by side. Column stacks them from top to bottom.

Nesting

Drop a layout inside a layout to mix a media column with stacked copy.

Installation

pnpm dlx shadcn@latest add https://content-kit.vercel.app/r/container.json

Usage

Properties

  • breakpointsobject[]Optional

    Layout definitions. Only the first entry is currently used and applies at all viewport widths. Provide one entry; the array is retained for future responsive breakpoint support.

    Item shape

    • classNamestringOptional

      Additional CSS class name(s) applied to the container.

    • columnsnumber | string[]Optional

      Number of items per row, each getting an equal share, OR an array of explicit widths (e.g. ["25%", "40%", "35%"]) for differently-sized columns. Only applies when direction is "row" (the default); ignored when direction is "column".

    • directionenumOptional

      Flex direction: "row" lays children out horizontally, "column" stacks them vertically.

      rowcolumn
    • wrapenumOptional

      Whether children wrap onto multiple lines when they don't fit.

      nowrapwrapwrap-reverse
    • justifyenumOptional

      Alignment of children along the main axis (CSS justify-content).

      flex-startflex-endcenterspace-betweenspace-aroundspace-evenly
    • alignenumOptional

      Alignment of children along the cross axis (CSS align-items).

      flex-startflex-endcenterstretchbaseline
    • gapstringOptional

      CSS gap value used as provided (e.g. "16px", "1rem", "16px 24px", "0"). With row column sizing, CSS variables and their fallbacks must resolve to a single length or percentage. Keyword gaps (normal, initial, unset, inherit, revert, revert-layer) skip the gap deduction in column widths, so a keyword that resolves to a non-zero gap can wrap columns early.

    • paddingstringOptional

      CSS padding value for the container (e.g. "1rem" or "8px 16px").

    • marginstringOptional

      CSS margin value for the container (e.g. "1rem" or "0 auto").

    • widthstringOptional

      Explicit width for this container as a flex item (e.g. "50%", "300px"), useful when nesting it as a column inside a parent Container.

    • heightstringOptional

      Explicit height for this container as a flex item (e.g. "50%", "300px"), useful when nesting it as a row inside a parent Container.

    • backgroundobjectOptional

      Container background (color/image/position/size/repeat/attachment).

    • borderobjectOptional

      Container border (width/style/color/radius).

    • opacitynumberOptional

      Container opacity from 0 (fully transparent) to 1 (fully opaque).