Launch sale — 60% off Pro
Contact
SeparatorSpacing

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Separator - With Margins

Separator with direct margins using my-6 applied to the separator element itself for precise spacing control built with shadcn/ui

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Space-y is convenient but sometimes you need explicit control. This React Separator uses my-6 (24px vertical margins) applied directly to the separator element, not the parent container. Built with shadcn/ui and Radix UI, direct margins give precise spacing control independent of sibling elements—perfect when sections have different spacing needs or when mixing separators with other components that shouldn't inherit space-y. The separator owns its spacing territory.

Section 1

Section 2

Pattern created by @haydenbleasel

Installation

Questions you might have