Composition
Stack & Cluster
nbStack is the default primitive for vertical rhythm. nbCluster is the default primitive for inline groups that may wrap. Use them everywhere instead of manually wiring up flex utilities.
When to use each
nbStack
Vertical flow with consistent gap. Use for page sections, form groups, card content, lists, and anywhere content stacks top-to-bottom.
nbCluster
Horizontal flow that wraps to multiple lines. Use for actions, chips, toolbar rows, tags, badges, and any group of inline items.
Stack — vertical card content
A job card using Stack to control vertical rhythm between title, description, and action.
Open role
Compose content vertically with predictable spacing.
Cluster — chip group
A Cluster wraps chips inline, letting them reflow naturally without fixed-width constraints.
Combined inside a Surface
Stack and Cluster working together inside a Surface. The outer Stack controls top-level spacing; the inner Clusters handle inline groups.
Senior Angular Engineer
Build loud UI primitives.
Gap values
Both Stack and Cluster use the same gap scale. Pick the right gap for the relationship between items — tight for related items, wider for distinct groups.
xssmmdlgxlKey inputs
gapnbStackVertical spacing — xs, sm, md, lg, xl
alignnbStackCross-axis — stretch, start, center, end
justifynbStackMain-axis — start, center, end, between
separatornbStackDivider between children — none, solid, dashed, thick
gapnbClusterHorizontal spacing — xs, sm, md, lg, xl
alignnbClusterCross-axis — start, center, end, baseline, stretch
justifynbClusterMain-axis — start, center, end, between
wrapnbClusterWrapping — wrap (default), nowrap