Separator Rails Components
Separators divide content into clear groups: horizontal rules, vertical dividers, labeled separators, and separators with actions. They are built with Tailwind CSS only, so there is no JavaScript to install.
Examples
Basic Separator
A horizontal <hr> between two blocks of content, plus short vertical separators between inline links.
Rails Blocks
Copy-paste UI components for Ruby on Rails.
<div class="w-full max-w-sm">
<div>
<h4 class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">Rails Blocks</h4>
<p class="mt-1 text-sm text-neutral-500 dark:text-neutral-400">Copy-paste UI components for Ruby on Rails.</p>
</div>
<!-- Horizontal separator: a thematic break between two blocks of content -->
<hr class="my-4 border-black/10 dark:border-white/10">
<nav aria-label="Resources" class="flex items-center gap-4 text-sm font-medium text-neutral-700 dark:text-neutral-200">
<a href="#" class="rounded-sm transition-colors duration-100 hover:text-neutral-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:hover:text-white dark:focus-visible:outline-neutral-200">Docs</a>
<!-- Vertical separator: purely decorative between links, so it is hidden from assistive tech -->
<div aria-hidden="true" class="h-4 w-px shrink-0 bg-black/10 dark:bg-white/15"></div>
<a href="#" class="rounded-sm transition-colors duration-100 hover:text-neutral-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:hover:text-white dark:focus-visible:outline-neutral-200">Components</a>
<div aria-hidden="true" class="h-4 w-px shrink-0 bg-black/10 dark:bg-white/15"></div>
<a href="#" class="rounded-sm transition-colors duration-100 hover:text-neutral-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:hover:text-white dark:focus-visible:outline-neutral-200">Changelog</a>
</nav>
</div>
Vertical Separator
Vertical separators in a toolbar, between inline text, and next to tall content. Use self-stretch to follow the height of the flex row, or a fixed height like h-4 for inline text.
Plan
Pro
Unlimited projects, priority support, and early access to every new component as soon as it ships.
<div class="flex w-full max-w-md flex-col gap-8">
<!-- Toolbar: separators use self-stretch, so they follow the height of the row -->
<div role="group" aria-label="Text formatting" class="flex w-fit items-stretch self-center rounded-xl border border-black/10 bg-white p-1 shadow-xs dark:border-white/10 dark:bg-neutral-800">
<button type="button" aria-label="Bold" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200 font-bold">B</button>
<button type="button" aria-label="Italic" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200 font-serif italic">I</button>
<button type="button" aria-label="Underline" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200 underline underline-offset-2">U</button>
<div role="separator" aria-orientation="vertical" class="mx-1 my-1 w-px shrink-0 self-stretch bg-black/10 dark:bg-white/10"></div>
<button type="button" aria-label="Align left" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><line x1="2.75" y1="4.75" x2="15.25" y2="4.75"></line><line x1="2.75" y1="9" x2="9.75" y2="9"></line><line x1="2.75" y1="13.25" x2="12.75" y2="13.25"></line></g></svg>
</button>
<button type="button" aria-label="Align center" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><line x1="2.75" y1="4.75" x2="15.25" y2="4.75"></line><line x1="5.5" y1="9" x2="12.5" y2="9"></line><line x1="4" y1="13.25" x2="14" y2="13.25"></line></g></svg>
</button>
<button type="button" aria-label="Align right" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><line x1="2.75" y1="4.75" x2="15.25" y2="4.75"></line><line x1="8.25" y1="9" x2="15.25" y2="9"></line><line x1="5.25" y1="13.25" x2="15.25" y2="13.25"></line></g></svg>
</button>
<div role="separator" aria-orientation="vertical" class="mx-1 my-1 w-px shrink-0 self-stretch bg-black/10 dark:bg-white/10"></div>
<button type="button" aria-label="Bulleted list" class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-transparent p-0 text-sm text-neutral-700 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:text-neutral-200 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200">
<svg xmlns="http://www.w3.org/2000/svg" class="size-4" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><line x1="7.25" y1="4.75" x2="15.25" y2="4.75"></line><line x1="7.25" y1="9" x2="15.25" y2="9"></line><line x1="7.25" y1="13.25" x2="15.25" y2="13.25"></line><circle cx="3.5" cy="4.75" r=".75" fill="currentColor"></circle><circle cx="3.5" cy="9" r=".75" fill="currentColor"></circle><circle cx="3.5" cy="13.25" r=".75" fill="currentColor"></circle></g></svg>
</button>
</div>
<!-- Inline meta: short, fixed-height separators between pieces of text -->
<div class="flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-sm text-neutral-500 dark:text-neutral-400">
<span class="font-medium text-neutral-900 dark:text-neutral-50">Olivia Martin</span>
<div aria-hidden="true" class="h-4 w-px shrink-0 bg-black/15 dark:bg-white/15"></div>
<time datetime="2026-11-09">Nov 9, 2026</time>
<div aria-hidden="true" class="h-4 w-px shrink-0 bg-black/15 dark:bg-white/15"></div>
<span>6 min read</span>
</div>
<!-- Tall content: the separator stretches to match the tallest column -->
<div class="flex items-stretch gap-5 rounded-xl border border-black/10 bg-white p-4 shadow-xs dark:border-white/10 dark:bg-neutral-800">
<div class="shrink-0">
<p class="text-xs text-neutral-500 dark:text-neutral-400">Plan</p>
<p class="mt-1 text-sm font-semibold text-neutral-900 dark:text-neutral-50">Pro</p>
</div>
<div role="separator" aria-orientation="vertical" class="w-px shrink-0 self-stretch bg-black/10 dark:bg-white/10"></div>
<p class="min-w-0 text-sm text-neutral-600 dark:text-neutral-300">Unlimited projects, priority support, and early access to every new component as soon as it ships.</p>
</div>
</div>
Separator with Label
Centered, left-aligned, and right-aligned labels, with eyebrow, pill, and icon variants. The lines are ::before and ::after pseudo-elements, so each separator is a single element.
<div class="flex w-full max-w-md flex-col gap-8">
<!-- Centered label: the two lines are ::before and ::after, so it is a single element -->
<div class="flex items-center gap-3 text-xs font-medium text-neutral-500 dark:text-neutral-400 before:h-px before:flex-1 before:bg-black/10 dark:before:bg-white/10 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10">
or continue with
</div>
<!-- Label on the left -->
<div class="flex items-center gap-3 text-xs font-medium text-neutral-500 dark:text-neutral-400 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10">
Account settings
</div>
<!-- Label on the right -->
<div class="flex items-center gap-3 text-xs font-medium text-neutral-500 dark:text-neutral-400 before:h-px before:flex-1 before:bg-black/10 dark:before:bg-white/10">
3 results
</div>
<!-- Uppercase eyebrow label -->
<div class="flex items-center gap-3 text-[11px] font-semibold tracking-wider text-neutral-400 uppercase before:h-px before:flex-1 before:bg-black/10 dark:before:bg-white/10 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10 dark:text-neutral-500">
Danger zone
</div>
<!-- Pill label -->
<div class="flex items-center gap-3 before:h-px before:flex-1 before:bg-black/10 dark:before:bg-white/10 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10">
<span class="rounded-full border border-black/10 bg-white px-2.5 py-0.5 text-xs font-medium text-neutral-600 shadow-xs dark:border-white/10 dark:bg-neutral-800 dark:text-neutral-300">Step 2 of 4</span>
</div>
<!-- Label with icon -->
<div class="flex items-center gap-3 text-xs font-medium text-neutral-500 dark:text-neutral-400 before:h-px before:flex-1 before:bg-black/10 dark:before:bg-white/10 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10">
<svg xmlns="http://www.w3.org/2000/svg" class="size-3.5" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><circle cx="9" cy="9" r="7.25"></circle><polyline points="9 4.75 9 9 12.25 11.25"></polyline></g></svg>
Earlier this week
</div>
</div>
Separator Styles
Solid, dashed, dotted, thick, double, gradient fade, accent glow, and ornament separators.
<div class="flex w-full max-w-md flex-col gap-6">
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Solid</span>
<hr class="flex-1 border-black/10 dark:border-white/10">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Strong</span>
<hr class="flex-1 border-neutral-300 dark:border-neutral-600">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Dashed</span>
<hr class="flex-1 border-dashed border-neutral-300 dark:border-neutral-600">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Dotted</span>
<hr class="flex-1 border-t-2 border-dotted border-neutral-300 dark:border-neutral-600">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Thick</span>
<hr class="h-0.5 flex-1 rounded-full border-0 bg-neutral-900 dark:bg-neutral-100">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Double</span>
<hr class="h-1 flex-1 border-x-0 border-y border-black/10 dark:border-white/15">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Fade</span>
<hr class="h-px flex-1 border-0 bg-linear-to-r from-transparent via-black/20 to-transparent dark:via-white/25">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Fade out</span>
<hr class="h-px flex-1 border-0 bg-linear-to-r from-black/20 to-transparent dark:from-white/25">
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Accent</span>
<!-- The ::after is a blurred copy of the line that gives it a soft glow -->
<div role="separator" aria-orientation="horizontal" class="relative h-px flex-1 bg-linear-to-r from-transparent via-blue-500 to-transparent after:absolute after:inset-x-[20%] after:-top-px after:h-[3px] after:bg-linear-to-r after:from-transparent after:via-blue-500/70 after:to-transparent after:blur-[3px] dark:via-blue-400 dark:after:via-blue-400/70"></div>
</div>
<div class="flex items-center gap-4">
<span class="w-16 shrink-0 text-xs text-neutral-500 dark:text-neutral-400">Ornament</span>
<div role="separator" aria-orientation="horizontal" class="flex flex-1 items-center gap-3 before:h-px before:flex-1 before:bg-linear-to-r before:from-transparent before:to-black/20 after:h-px after:flex-1 after:bg-linear-to-l after:from-transparent after:to-black/20 dark:before:to-white/25 dark:after:to-white/25">
<span class="size-1.5 rotate-45 bg-neutral-400 dark:bg-neutral-500"></span>
</div>
</div>
</div>
Separator with Action
An insert-between-items separator that grows a line and reveals its label on hover or keyboard focus, and a classic “load more” button sitting on the line.
When a user signs up
Trigger
Send the welcome email
Action
Wait 2 days, then check activity
Delay
<div class="flex w-full max-w-md flex-col gap-10">
<!-- Insert between items: hover (or focus) a gap to grow the line and reveal the label -->
<div>
<div class="flex items-center gap-3 rounded-xl border border-black/10 bg-white px-3.5 py-3 shadow-xs dark:border-white/10 dark:bg-neutral-800">
<span class="flex size-6 shrink-0 items-center justify-center rounded-md bg-neutral-100 text-xs font-semibold text-neutral-600 dark:bg-white/10 dark:text-neutral-300">1</span>
<div class="min-w-0">
<p class="truncate text-sm font-medium text-neutral-900 dark:text-neutral-50">When a user signs up</p>
<p class="truncate text-xs text-neutral-500 dark:text-neutral-400">Trigger</p>
</div>
</div>
<div class="group flex h-9 items-center before:h-px before:flex-1 before:origin-right before:scale-x-50 before:bg-blue-500 before:opacity-0 before:transition-[scale,opacity] before:duration-200 before:ease-[cubic-bezier(0.23,1,0.32,1)] after:h-px after:flex-1 after:origin-left after:scale-x-50 after:bg-blue-500 after:opacity-0 after:transition-[scale,opacity] after:duration-200 after:ease-[cubic-bezier(0.23,1,0.32,1)] hover:before:scale-x-100 hover:before:opacity-100 hover:after:scale-x-100 hover:after:opacity-100 focus-within:before:scale-x-100 focus-within:before:opacity-100 focus-within:after:scale-x-100 focus-within:after:opacity-100 motion-reduce:before:transition-none motion-reduce:after:transition-none">
<button type="button" class="relative mx-2 flex h-6 items-center justify-center rounded-full border border-black/10 bg-white px-[5px] text-xs font-medium whitespace-nowrap text-neutral-500 shadow-xs transition-[background-color,border-color,color] duration-150 ease-out select-none before:absolute before:-inset-2.5 group-hover:border-blue-500 group-hover:bg-blue-500 group-hover:text-white focus-visible:border-blue-500 focus-visible:bg-blue-500 focus-visible:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 dark:border-white/10 dark:bg-neutral-800 dark:text-neutral-400 dark:group-hover:border-blue-500 dark:group-hover:bg-blue-500 dark:group-hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="size-3 shrink-0" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><line x1="6" y1="1.75" x2="6" y2="10.25"></line><line x1="1.75" y1="6" x2="10.25" y2="6"></line></g></svg>
<span class="grid grid-cols-[0fr] opacity-0 transition-[grid-template-columns,opacity] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:grid-cols-[1fr] group-hover:opacity-100 group-focus-within:grid-cols-[1fr] group-focus-within:opacity-100 motion-reduce:transition-none">
<span class="overflow-hidden"><span class="px-1">Add step</span></span>
</span>
</button>
</div>
<div class="flex items-center gap-3 rounded-xl border border-black/10 bg-white px-3.5 py-3 shadow-xs dark:border-white/10 dark:bg-neutral-800">
<span class="flex size-6 shrink-0 items-center justify-center rounded-md bg-neutral-100 text-xs font-semibold text-neutral-600 dark:bg-white/10 dark:text-neutral-300">2</span>
<div class="min-w-0">
<p class="truncate text-sm font-medium text-neutral-900 dark:text-neutral-50">Send the welcome email</p>
<p class="truncate text-xs text-neutral-500 dark:text-neutral-400">Action</p>
</div>
</div>
<div class="group flex h-9 items-center before:h-px before:flex-1 before:origin-right before:scale-x-50 before:bg-blue-500 before:opacity-0 before:transition-[scale,opacity] before:duration-200 before:ease-[cubic-bezier(0.23,1,0.32,1)] after:h-px after:flex-1 after:origin-left after:scale-x-50 after:bg-blue-500 after:opacity-0 after:transition-[scale,opacity] after:duration-200 after:ease-[cubic-bezier(0.23,1,0.32,1)] hover:before:scale-x-100 hover:before:opacity-100 hover:after:scale-x-100 hover:after:opacity-100 focus-within:before:scale-x-100 focus-within:before:opacity-100 focus-within:after:scale-x-100 focus-within:after:opacity-100 motion-reduce:before:transition-none motion-reduce:after:transition-none">
<button type="button" class="relative mx-2 flex h-6 items-center justify-center rounded-full border border-black/10 bg-white px-[5px] text-xs font-medium whitespace-nowrap text-neutral-500 shadow-xs transition-[background-color,border-color,color] duration-150 ease-out select-none before:absolute before:-inset-2.5 group-hover:border-blue-500 group-hover:bg-blue-500 group-hover:text-white focus-visible:border-blue-500 focus-visible:bg-blue-500 focus-visible:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 dark:border-white/10 dark:bg-neutral-800 dark:text-neutral-400 dark:group-hover:border-blue-500 dark:group-hover:bg-blue-500 dark:group-hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="size-3 shrink-0" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><line x1="6" y1="1.75" x2="6" y2="10.25"></line><line x1="1.75" y1="6" x2="10.25" y2="6"></line></g></svg>
<span class="grid grid-cols-[0fr] opacity-0 transition-[grid-template-columns,opacity] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] group-hover:grid-cols-[1fr] group-hover:opacity-100 group-focus-within:grid-cols-[1fr] group-focus-within:opacity-100 motion-reduce:transition-none">
<span class="overflow-hidden"><span class="px-1">Add step</span></span>
</span>
</button>
</div>
<div class="flex items-center gap-3 rounded-xl border border-black/10 bg-white px-3.5 py-3 shadow-xs dark:border-white/10 dark:bg-neutral-800">
<span class="flex size-6 shrink-0 items-center justify-center rounded-md bg-neutral-100 text-xs font-semibold text-neutral-600 dark:bg-white/10 dark:text-neutral-300">3</span>
<div class="min-w-0">
<p class="truncate text-sm font-medium text-neutral-900 dark:text-neutral-50">Wait 2 days, then check activity</p>
<p class="truncate text-xs text-neutral-500 dark:text-neutral-400">Delay</p>
</div>
</div>
</div>
<!-- Button in the middle of the line -->
<div class="flex items-center gap-3 before:h-px before:flex-1 before:bg-black/10 after:h-px after:flex-1 after:bg-black/10 dark:before:bg-white/10 dark:after:bg-white/10">
<button type="button" class="group flex items-center justify-center gap-1.5 rounded-full border border-black/10 bg-white py-1.5 pr-2.5 pl-3 text-xs font-medium whitespace-nowrap text-neutral-800 shadow-xs transition-all duration-100 ease-in-out select-none hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-700 dark:focus-visible:outline-neutral-200">
Load 12 more
<svg xmlns="http://www.w3.org/2000/svg" class="size-3 transition-transform duration-150 ease-out group-hover:translate-y-0.5 motion-reduce:transition-none" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor"><polyline points="2.25 4.5 6 8.25 9.75 4.5"></polyline></g></svg>
</button>
</div>
</div>
Date Separator
Date pills and an unread marker that split a conversation or activity feed into groups.
Olivia Martin
The new pricing page is ready for review.
Jackson Lee
Looks great. One small note on the annual toggle.
Olivia Martin
Good catch, fixing it now.
<div class="w-full max-w-md">
<div class="space-y-3 rounded-xl border border-black/10 bg-white p-4 shadow-xs dark:border-white/10 dark:bg-neutral-900">
<!-- Date separator: role="separator" with an aria-label, the visible pill is presentational -->
<div role="separator" aria-label="Yesterday" class="flex items-center gap-3 py-1 before:h-px before:flex-1 before:bg-black/10 after:h-px after:flex-1 after:bg-black/10 dark:before:bg-white/10 dark:after:bg-white/10">
<span class="rounded-full border border-black/10 bg-white px-2.5 py-0.5 text-xs font-medium text-neutral-600 shadow-xs dark:border-white/10 dark:bg-neutral-800 dark:text-neutral-300">Yesterday</span>
</div>
<div class="flex gap-3">
<span aria-hidden="true" class="flex size-8 shrink-0 items-center justify-center rounded-full text-xs font-semibold bg-amber-100 text-amber-800 dark:bg-amber-400/15 dark:text-amber-300">OM</span>
<div class="min-w-0">
<p class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">Olivia Martin <time datetime="2026-11-08T17:42" class="text-xs font-normal text-neutral-400 dark:text-neutral-500">5:42 PM</time></p>
<p class="text-sm text-neutral-700 dark:text-neutral-300">The new pricing page is ready for review.</p>
</div>
</div>
<div role="separator" aria-label="Today" class="flex items-center gap-3 py-1 before:h-px before:flex-1 before:bg-black/10 after:h-px after:flex-1 after:bg-black/10 dark:before:bg-white/10 dark:after:bg-white/10">
<span class="rounded-full border border-black/10 bg-white px-2.5 py-0.5 text-xs font-medium text-neutral-600 shadow-xs dark:border-white/10 dark:bg-neutral-800 dark:text-neutral-300">Today</span>
</div>
<div class="flex gap-3">
<span aria-hidden="true" class="flex size-8 shrink-0 items-center justify-center rounded-full text-xs font-semibold bg-sky-100 text-sky-800 dark:bg-sky-400/15 dark:text-sky-300">JL</span>
<div class="min-w-0">
<p class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">Jackson Lee <time datetime="2026-11-09T09:15" class="text-xs font-normal text-neutral-400 dark:text-neutral-500">9:15 AM</time></p>
<p class="text-sm text-neutral-700 dark:text-neutral-300">Looks great. One small note on the annual toggle.</p>
</div>
</div>
<!-- Unread marker: everything below this line is new -->
<div role="separator" aria-label="New messages" class="flex items-center gap-2 before:h-px before:flex-1 before:bg-red-500/50 dark:before:bg-red-400/50">
<span class="text-[11px] font-semibold tracking-wide text-red-600 uppercase dark:text-red-400">New</span>
</div>
<div class="flex gap-3">
<span aria-hidden="true" class="flex size-8 shrink-0 items-center justify-center rounded-full text-xs font-semibold bg-amber-100 text-amber-800 dark:bg-amber-400/15 dark:text-amber-300">OM</span>
<div class="min-w-0">
<p class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">Olivia Martin <time datetime="2026-11-09T09:21" class="text-xs font-normal text-neutral-400 dark:text-neutral-500">9:21 AM</time></p>
<p class="text-sm text-neutral-700 dark:text-neutral-300">Good catch, fixing it now.</p>
</div>
</div>
</div>
</div>
Section Separator
A section heading with a count and an action, joined by a line that fills the remaining space.
<div class="w-full max-w-md">
<section aria-labelledby="separator-pinned-heading">
<!-- Heading, line, action: the line is the ::after of the row, placed between the two with order -->
<div class="flex items-center gap-3 after:order-2 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10">
<h3 id="separator-pinned-heading" class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">Pinned<span class="ml-1.5 text-xs font-normal text-neutral-400 tabular-nums dark:text-neutral-500">2</span></h3>
<a href="#" class="order-3 -mr-1.5 flex items-center justify-center gap-1.5 rounded-lg bg-transparent px-1.5 py-1 text-xs font-medium whitespace-nowrap text-neutral-600 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:text-neutral-300 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200">View all</a>
</div>
<ul class="mt-2">
<li class="flex items-center justify-between gap-4 py-1.5 text-sm">
<span class="truncate text-neutral-700 dark:text-neutral-200">Q4 roadmap</span>
<span class="shrink-0 text-xs text-neutral-400 dark:text-neutral-500">Edited 2h ago</span>
</li>
<li class="flex items-center justify-between gap-4 py-1.5 text-sm">
<span class="truncate text-neutral-700 dark:text-neutral-200">Brand guidelines</span>
<span class="shrink-0 text-xs text-neutral-400 dark:text-neutral-500">Edited yesterday</span>
</li>
</ul>
</section>
<section aria-labelledby="separator-recent-heading" class="mt-6">
<div class="flex items-center gap-3 after:order-2 after:h-px after:flex-1 after:bg-black/10 dark:after:bg-white/10">
<h3 id="separator-recent-heading" class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">Recent<span class="ml-1.5 text-xs font-normal text-neutral-400 tabular-nums dark:text-neutral-500">14</span></h3>
<a href="#" class="order-3 -mr-1.5 flex items-center justify-center gap-1.5 rounded-lg bg-transparent px-1.5 py-1 text-xs font-medium whitespace-nowrap text-neutral-600 transition-all duration-100 ease-in-out select-none hover:bg-neutral-100 hover:text-neutral-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:text-neutral-300 dark:hover:bg-neutral-600/50 dark:hover:text-white dark:focus-visible:outline-neutral-200">View all</a>
</div>
<ul class="mt-2">
<li class="flex items-center justify-between gap-4 py-1.5 text-sm">
<span class="truncate text-neutral-700 dark:text-neutral-200">Onboarding email sequence</span>
<span class="shrink-0 text-xs text-neutral-400 dark:text-neutral-500">Edited Nov 6</span>
</li>
<li class="flex items-center justify-between gap-4 py-1.5 text-sm">
<span class="truncate text-neutral-700 dark:text-neutral-200">Customer interview notes</span>
<span class="shrink-0 text-xs text-neutral-400 dark:text-neutral-500">Edited Nov 4</span>
</li>
</ul>
</section>
</div>
Separator in a Form
A sign-in card that uses a labeled separator between social and email sign-in, and a full-bleed separator above the footer.
<div class="w-full max-w-sm">
<form action="#" class="rounded-xl border border-black/10 bg-white p-6 shadow-xs dark:border-white/10 dark:bg-neutral-800">
<h3 class="text-base font-semibold text-neutral-900 dark:text-neutral-50">Welcome back</h3>
<p class="mt-1 text-sm text-neutral-500 dark:text-neutral-400">Sign in to your account to continue.</p>
<div class="mt-5 grid grid-cols-2 gap-2">
<button type="button" class="flex items-center justify-center gap-1.5 rounded-lg border border-black/10 bg-white/90 px-3.5 py-2 text-sm font-medium whitespace-nowrap text-neutral-800 shadow-xs transition-all duration-100 ease-in-out select-none hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:border-white/10 dark:bg-neutral-700/50 dark:text-neutral-50 dark:hover:bg-neutral-700/75 dark:focus-visible:outline-neutral-200">
<svg class="size-4" viewBox="0 0 24 24" aria-hidden="true">
<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
<path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
<path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/>
<path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/>
</svg>
Google
</button>
<button type="button" class="flex items-center justify-center gap-1.5 rounded-lg border border-black/10 bg-white/90 px-3.5 py-2 text-sm font-medium whitespace-nowrap text-neutral-800 shadow-xs transition-all duration-100 ease-in-out select-none hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:border-white/10 dark:bg-neutral-700/50 dark:text-neutral-50 dark:hover:bg-neutral-700/75 dark:focus-visible:outline-neutral-200">
<svg class="size-4" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
GitHub
</button>
</div>
<!-- Labeled separator between the two ways to sign in -->
<div class="my-5 flex items-center gap-3 text-xs text-neutral-500 before:h-px before:flex-1 before:bg-black/10 after:h-px after:flex-1 after:bg-black/10 dark:text-neutral-400 dark:before:bg-white/10 dark:after:bg-white/10">
or continue with email
</div>
<div class="space-y-1.5">
<label for="separator-login-email">Email</label>
<input type="email" id="separator-login-email" name="email" autocomplete="email" placeholder="you@example.com" class="form-control">
</div>
<button type="submit" class="mt-4 flex w-full items-center justify-center gap-1.5 rounded-lg border border-neutral-400/30 bg-neutral-800 px-3.5 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-all duration-100 ease-in-out select-none hover:bg-neutral-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-white dark:text-neutral-800 dark:hover:bg-neutral-100 dark:focus-visible:outline-neutral-200">
Send magic link
</button>
<!-- Full-bleed separator: negative margins cancel the card padding -->
<hr class="-mx-6 mt-6 border-black/10 dark:border-white/10">
<p class="-mb-1 pt-4 text-center text-sm text-neutral-500 dark:text-neutral-400">
New here?
<a href="#" class="rounded-sm font-medium text-neutral-900 underline decoration-black/20 underline-offset-4 transition-colors duration-100 hover:decoration-black/60 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-600 dark:text-neutral-50 dark:decoration-white/30 dark:hover:decoration-white/70 dark:focus-visible:outline-neutral-200">Create an account</a>
</p>
</form>
</div>
Responsive Separator
Stats that stack with horizontal separators on mobile and sit side by side with vertical separators on larger screens. One element, flipped with sm: utilities.
This month
Nov 1 – Nov 9Revenue
$12,480
New customers
184
Churn
1.2%
<div class="w-full max-w-lg">
<div class="rounded-xl border border-black/10 bg-white shadow-xs dark:border-white/10 dark:bg-neutral-800">
<div class="flex items-center justify-between gap-4 px-5 py-4">
<h3 class="text-sm font-semibold text-neutral-900 dark:text-neutral-50">This month</h3>
<span class="text-xs text-neutral-500 dark:text-neutral-400">Nov 1 – Nov 9</span>
</div>
<hr class="border-black/10 dark:border-white/10">
<!-- Stacked with horizontal separators on mobile, side by side with vertical separators from sm: up -->
<div class="flex flex-col gap-4 px-5 py-4 sm:flex-row sm:gap-5">
<div class="flex-1">
<p class="text-xs text-neutral-500 dark:text-neutral-400">Revenue</p>
<p class="mt-1 text-2xl font-semibold tracking-tight text-neutral-900 tabular-nums dark:text-neutral-50">$12,480</p>
</div>
<div aria-hidden="true" class="h-px w-full shrink-0 bg-black/10 sm:h-auto sm:w-px sm:self-stretch dark:bg-white/10"></div>
<div class="flex-1">
<p class="text-xs text-neutral-500 dark:text-neutral-400">New customers</p>
<p class="mt-1 text-2xl font-semibold tracking-tight text-neutral-900 tabular-nums dark:text-neutral-50">184</p>
</div>
<div aria-hidden="true" class="h-px w-full shrink-0 bg-black/10 sm:h-auto sm:w-px sm:self-stretch dark:bg-white/10"></div>
<div class="flex-1">
<p class="text-xs text-neutral-500 dark:text-neutral-400">Churn</p>
<p class="mt-1 text-2xl font-semibold tracking-tight text-neutral-900 tabular-nums dark:text-neutral-50">1.2%</p>
</div>
</div>
</div>
</div>
Accessibility
- Use <hr> for a thematic break between blocks of content. It has the separator role built in.
- When an <hr> does not fit (vertical separators, lines with pseudo-elements), use role="separator" with aria-orientation="vertical" or "horizontal".
- Children of a role="separator" element are not announced. Give it an aria-label when it carries meaning, like a date.
- Purely visual separators, like the lines between inline links, should use aria-hidden="true" so screen readers skip them.
- When a separator holds readable text or a button, keep the container role-free so the text and the button stay reachable.