A perforated divider can use an arbitrary background value when a standard border lacks the desired spacing. Keep the pattern in one reusable class list.
Worked example
<hr class="demo border-0 border-t-[3px] border-dashed border-slate-600 my-6" />Implementation notes
Repeating backgrounds depend on device rounding. Inspect the final divider at more than one zoom level before fine-tuning individual dash lengths.
Try it yourself
Resize a receipt card and inspect the join at either edge.
Open the Tailwind CSS example →Editorial date November 3, 2026 · Published December 6, 2026