vert-ui
Browse docs
All components

Cluster

A wrapping inline group: rows of tags, toolbars and button sets that flow onto new lines instead of overflowing.

Install

Install the component

Add the source straight into your project with the shadcn CLI — no package dependency to track.

npx shadcn@latest add https://vert-ui.dev/r/cluster.json

Preview

Live preview

designengineeringresearchcontentgrowthops

Usage

Examples

Toolbar

<Cluster justify="between" gap={3}>
  <Cluster gap={2}>
    <Button variant="outline">Undo</Button>
    <Button variant="outline">Redo</Button>
  </Cluster>
  <Button>Publish</Button>
</Cluster>

Centred action row

<Cluster justify="center" gap={2}>
  <Button>Save</Button>
  <Button variant="outline">Cancel</Button>
</Cluster>

Reference

Props

PropTypeDefaultDescription
gap0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 122Spacing between items on the token scale.
smGap / mdGap / lgGapsame scale—Gap overrides from each breakpoint up.
align"start" | "center" | "end" | "baseline" | "stretch""center"Cross-axis alignment of the items.
justify"start" | "center" | "end" | "between" | "around" | "evenly""start"Main-axis distribution of the items.
asChildbooleanfalseRender the child element instead of a div — keeps the styles.

Accessibility

Accessibility notes

  • Items remain in DOM order and every item keeps its own focusability — wrapping never hides or reorders a control.
  • Aligned to the cross-axis centre by default so mixed-height items (badges next to buttons) stay optically balanced.
  • Gaps scale with the token system, keeping wrapped rows legible without manual margins.