26 CSS Dividers
26 hand-coded CSS dividers for SaaS landing hero-to-section transitions, editorial article breaks, documentation callouts, and e-commerce category pages — SVG wave section divider, diagonal slanted split, gradient horizontal rule, "OR" text divider for auth forms, curved arch, zigzag torn paper, blob organic morph, ornamental pseudo-element glyph, plus 18 aesthetic themes (brutalist, art deco, cyberpunk, luxury gold, wedding heart, medieval crest, 8-bit pixel, newspaper rule, audio waveform, confetti, and more). 22 Pure CSS + 4 Light JS. Scoped under .div-NN for no-collision pasting, prefers-reduced-motion guarded per WCAG 2.3.3, framework-agnostic (React, Vue, Svelte, Astro, Next, Nuxt).
Related20 CSS Diagonal Sections14 CSS Wave Section Dividers25 CSS Blockquotes31 CSS Hero Sections25 CSS Testimonials & Reviews
Course pickPartner: Zero to Mastery
Affiliate linkWant to build production-ready CSS layouts, animations and UI from scratch?
You just browsed 26 dividers. Learn the Flexbox, Grid and animation thinking behind them, so the next component starts in your head, not in a copy-paste.
Every ZTM course in one membership: $25/month, paid yearly at $299 · 30‑day money-back guarantee
The CSS Bootcamp. We may earn a commission, at no extra cost to you.
02. Diagonal Slanted Section Divider CSS (opens in a new tab)
03. Gradient Horizontal Rule CSS (opens in a new tab)
<hr> so the semantics survive: a fade-to-transparent hairline, a multi-stop brand spectrum, a hard-stop colour-band rule, and an animated sheen driven by @property so the gradient position is a genuinely interpolatable value. Every version resets the browser's inset border first — the step most snippets skip.04. Text with Lines on Sides Divider CSS ("OR" Divider) (opens in a new tab)
05. Curved Arch Section Divider CSS (opens in a new tab)
06. Zigzag Torn Paper Cut Divider CSS (opens in a new tab)
07. Blob Organic SVG Divider CSS (opens in a new tab)
08. Pure CSS Ornamental Divider with Pseudo-Elements (opens in a new tab)
<hr> — with the glyph injected by content: attr(data-glyph) and the flanking rules painted as backgrounds. No wrapper divs, no spans, no icon font. Because the ornament is a data attribute, one CSS rule serves diamonds, fleurons, asterisks and chevrons, and the markup stays a semantically correct thematic break.09. Editorial Article Serif Divider CSS (opens in a new tab)
10. Neo-Brutalist Heavy Border Divider CSS (opens in a new tab)
11. Art Deco Geometric Gold Divider CSS (opens in a new tab)
12. Organic Leaf & Vine SVG Divider CSS (opens in a new tab)
13. Cyberpunk Neon Glow Divider CSS (opens in a new tab)
14. Luxury Minimalist Gold Accent HR Line CSS (opens in a new tab)
15. Data Dashboard Dotted Grid Divider CSS (opens in a new tab)
16. Wedding Heart Icon Divider CSS (opens in a new tab)
17. Editorial Thin Double-Line Divider CSS (opens in a new tab)
18. Medieval Fantasy Star Crest Divider CSS (opens in a new tab)
19. Subtle Faded Border-Bottom Divider CSS (opens in a new tab)
20. 8-Bit Retro Pixelated Divider CSS (opens in a new tab)
21. Multi-Column Newspaper Rule Divider CSS (opens in a new tab)
column-rule — a vertical hairline drawn in the gutter automatically, at the right height, that reflows when the column count changes and disappears when the layout drops to one column. Paired with a double-rule masthead and a hanging section label, it turns any article into a broadsheet without a single wrapper div.22. Bouncing Animated Dots Divider CSS (opens in a new tab)
23. Audio Waveform SVG Divider CSS (opens in a new tab)
24. Confetti & Sparkle SVG Divider CSS (opens in a new tab)
25. Vertical Flexbox Divider Line CSS (opens in a new tab)
26. Hand-Drawn Doodle SVG Divider CSS (opens in a new tab)
Frequently asked questions
What's the semantically correct HTML for a section divider — semantic hr, aria role separator, or a decorative div?
hr { border: 0; height: auto; ... }. (2) <div role='separator'> — for non-thematic UI dividers. Use when the divider marks a UI region boundary (between navigation groups, between form sections, between toolbar buttons) rather than a content-topic shift. The aria-orientation='horizontal' or 'vertical' attribute tells assistive tech which axis the separator runs on. This is the correct pattern for the vertical divider between navigation links (Demo 25) — a horizontal <hr> rotated 90° would confuse screen readers. (3) Purely decorative dividers get aria-hidden='true'. An animated pulse of dots between article sections, a bouncing loader dot divider, or a decorative flourish that repeats every paragraph adds visual rhythm but zero semantic value — screen readers should skip them. Set aria-hidden='true' and never rely on ARIA labels for purely-visual noise. Every demo in this collection follows one of these three patterns based on its intended use. The Docusaurus / Mintlify / Nextra callout / admonition pattern (used inline in documentation) is a fourth adjacent case: for those, use <aside role='note'> not <hr>, because the callout groups content rather than separates it.How do I build an SVG wave section divider — the Stripe / Linear / Vercel SaaS landing hero-to-section transition pattern?
preserveAspectRatio='none' stretches the wave horizontally to any width while keeping its vertical proportion — the pattern Stripe / Linear / Vercel / Notion / Framer / Superhuman all ship. The color-match trap: the wave's fill color must match the NEXT section's background exactly. If your hero is dark navy and the next section is white, the wave fill is white — the wave visually 'is' the transition into the white section. Getting the color one shade off reads as a broken alpha mask. Use CSS custom properties so the wave color derives from the same token as the next section's background: fill: var(--section-below-bg). Alternatives: the shape can be a diagonal (Demo 02), a curved arch (Demo 05), a torn paper (Demo 06), or an organic blob (Demo 07) — every one uses the same three-component pattern with the shape SVG swapped. Compositor-safe: SVG paths render on the compositor thread and don't trigger layout, so a wave divider adds ~0.5ms to LCP + 0 CLS + 0 INP tax. Compare to shipping Aceternity UI section-divider components (~40KB React runtime + Framer Motion peer dep at ~40KB gzipped) or gsap DrawSVG (~30KB + $99/yr Club GreenSock license) — the pure-SVG approach in Demo 01 is 0KB, INP-safe, and stays crisp at any viewport width.How do I add a diagonal / slanted section divider between full-width sections — the Airbnb / Notion landing hero pattern?
clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%) — the section is clipped to a trapezoid shape, creating a diagonal bottom edge. Compositor-safe, works down to Chrome 55 / Safari 13.1 / Firefox 81 (Baseline since 2020). Zero JavaScript. Every tier-1 SaaS marketing site with a diagonal hero (Airbnb, Notion, Slack landing) uses this pattern. Trap: elements positioned near the clipped edge get cut off — never place important CTAs or images in the clipped triangle area. Use padding-bottom to reserve safe space below content. (2) transform: skewY. Skew a child divider element by 3-6 degrees to create the diagonal line. Works but requires unskewing every child element inside (transform: skewY(-4deg) on grandchildren) — messy and easy to break. Only use when you need actual skewed CONTENT inside the diagonal area (rare). (3) SVG polygon. An inline <svg> with a <polygon> that defines the diagonal shape. Most control (curved diagonals, multi-point shapes, animated stroke) but higher DOM cost than clip-path. Use when the diagonal needs animation (draw-in on scroll, pulse, color shift). Which to use when: clip-path polygon for 90% of diagonal sections. transform:skewY only when the diagonal contains skewed CONTENT. SVG polygon when the diagonal needs to be animated. All three are compositor-safe if you avoid layout properties. The color-match rule: same as the SVG wave — the diagonal edge must match the next section's background exactly, or the illusion breaks. If your hero uses background: linear-gradient(...), the transition into a white next-section works better with an SVG wave/polygon than clip-path (because clip-path clips the gradient at an arbitrary point, sometimes producing visible color banding). The 44px rule stays: the diagonal's visible area shouldn't push interactive elements below their WCAG 2.5.5 44×44 hit-target requirement — verify at 320px viewport that no button gets clipped or squeezed.How do I style the plain HTML hr element with a gradient — the most-searched CSS divider query?
hr { border: 0; height: auto; margin: 0; }. The border attribute is what the browser uses to draw the gray line — remove it, then set your own height and margin. (2) Apply the gradient: height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);. The transparent-to-accent-to-transparent gradient gives the classic 'fade-in fade-out' editorial rule — the most-copied hr pattern on Medium, Substack, The Atlantic, NYT longform, Vox, The Verge, and every SaaS blog. (3) Space it right: margin: 2.5rem auto; width: min(280px, 100%);. The narrower-than-content-width rule reads as a deliberate design choice; a full-bleed hr reads as accidental. 2.5rem margin gives breathing room without disrupting reading flow. Variants: multi-color gradient (linear-gradient(90deg, #ff6b6b, #f9ca24, #4ecdc4)) for playful blogs, animated gradient with background-size: 300% 100%; animation: shift 4s infinite for premium marketing pages, radial gradient dot with background: radial-gradient(circle, var(--accent) 0%, transparent 40%); height: 8px for a subtle dot-in-the-middle break. The Tailwind Typography plugin ships prose hr styling out of the box but ships as a coupled ~15KB Typography bundle you can't cherry-pick. If you already use @tailwindcss/typography, override with hr:where(.prose *) { background: var(--accent-gradient); }. Otherwise the vanilla CSS in Demo 03 is 4 lines and works in every framework. Semantic bonus: keep the <hr> element (not a <div>) so screen readers still announce the thematic break correctly.How do I build a Docusaurus / Mintlify / Nextra-style section divider for documentation pages?
Which CSS divider patterns fit high-CPM verticals — SaaS landing heroes, e-commerce category pages, wedding sites, luxury e-comm, dashboard analytics?
Do these CSS dividers work in React, Vue, Svelte, Astro, Next.js, Nuxt — and how do they compare to shadcn Separator / Radix Separator / Tailwind Typography hr?
class to className, drop the JSX into any server or client component. The 22 Pure CSS demos need NO 'use client' directive — they're static SSR-safe HTML that works with JavaScript disabled. Only the 4 Light-JS demos need client-side hydration, each under 30 lines of vanilla JavaScript. Vue 3 / Nuxt 3: accepts as-is. Svelte / SvelteKit: accepts as-is; wrap in a .svelte component for scoped styles. Astro: drop into any .astro component (this site is Astro; every demo renders SSR here). Remix / Solid.js / Qwik / Lit: accepts as-is. Compared to framework-specific divider primitives: shadcn/ui Separator ships a thin wrapper on Radix Separator (~2KB Radix + React 18+ peer dep) that gives you role='separator' + aria-orientation handling for free — but you still write all 26 visual designs yourself on top of it. @radix-ui/react-separator is the same ~2KB primitive; provides accessibility but no visual style. @mui/material Divider ships as part of Material UI's ~85KB base bundle + Emotion runtime — locks you into MUI theming. @chakra-ui/react Divider requires Chakra's ~50KB Emotion runtime + full theme provider. Ant Design Divider is part of AntD's ~200KB base bundle. Tailwind Typography plugin (@tailwindcss/typography) ships prose hr styling out of the box but adds ~15KB to your Tailwind bundle and every prose style is coupled — you can't cherry-pick just the hr. The 26 dividers in this collection total 1-4KB gzipped per demo when you cherry-pick — an entire divider system for less than a single Radix primitive. The .div-NN numeric-prefix scoping means all 26 patterns coexist on the gallery page without a single class collision, and the same prefix guarantees you can drop any demo into a codebase that already uses .divider, .separator, .hr, or .rule classes without renaming a single selector. MIT licensed, no attribution required, no signup, no build step.How do I make CSS dividers accessible for screen readers and keyboard users — the WCAG 2.2 AA compliance checklist?
aria-hidden='true'. Never use a <div> where an <hr> is semantically appropriate — you lose the free screen-reader announcement. (2) Contrast per WCAG 1.4.3 and 1.4.11. A divider that's too faint to see fails accessibility. Divider line ≥ 3:1 contrast against background per WCAG 1.4.11 Non-text Contrast — measure with axe DevTools or Chrome DevTools contrast checker. Never rely on pure gray-on-gray (#e0e0e0 on #f5f5f5 fails). This collection's demos use oklch() perceptual color so contrast stays predictable across light/dark themes. (3) Reduced motion per WCAG 2.3.3. Every animated divider (bouncing dots Demo 22, audio waveform Demo 23, cyberpunk neon pulse Demo 13, animated gradient border, confetti Demo 24) wraps its animation in @media (prefers-reduced-motion: reduce) { .div-NN * { animation: none !important; transition-duration: 0.01ms !important; }}. This is a legal-enforcement requirement in the EU EAA (took effect June 28, 2025 with €5M per country max fines) and Section 508. (4) Focus visible per WCAG 2.4.13 — only relevant if the divider itself is interactive (rare, but Demo 22's bouncing dots could be wired to jump-to-section anchors). If interactive, ship :focus-visible outline at 2px minimum, 3:1 contrast against surrounding surface. Never outline: none without visible replacement. (5) Never rely on color alone per WCAG 1.4.1 Use of Color. A divider that ONLY communicates state through color (a green divider for 'active section', red for 'blocked') fails colorblind users. Add shape / icon / text distinction. This mostly matters for callout dividers (Info / Warning / Tip / Note) where the color-only version fails colorblind users — pair color with an icon (ⓘ ⚠ 💡 📝) per WCAG 1.4.1 AA. Legal enforcement in tier-1 markets: US ADA Title III lawsuits hit ~4000/year since 2019 (Domino's v. Robles precedent at $50K per site). Section 508 makes AA the federal-contract floor. EU EAA €5M per country max fines. Canada ACA, Australia DDA, UK Equality Act 2010 all interpret 'reasonable accommodation' as WCAG 2.1/2.2 AA. Every divider in this collection ships pattern-compliant so you never rebuild for an audit.Related collections
30 CSS Badges
30 hand-coded CSS badges for status indicators, notifications, membership tiers, live-data displays, and SEO / DevOps / financial dashboards — upload progress, typing indicator, transit line status, Core Web Vitals, ECG heartbeat, CI/CD build pipeline, countdown ring, live price ticker, keycap shortcut, wax seal, conference lanyard, and holographic collectibles. Copy-paste HTML and CSS, WCAG 2.2 accessible, MIT licensed.
20 CSS Banners & Alerts
20 hand-coded CSS banner and alert bars for e-commerce storefronts, SaaS dashboards, marketing sites, and compliance-bound products. Covers GDPR cookie consent with a real preferences panel, promo bars with countdown timers, free-shipping threshold progress, app-install smart banners, maintenance and incident status bars, newsletter signup bars, age verification gates, limited-stock urgency banners, live event announcements, browser upgrade notices, geo and currency switchers, sticky top announcement bars, bottom cookie bars, inline form validation alerts, icon-aligned alert banners, left-border accent alerts, diagonal stripe promos, full-width hero banners, animated gradient border alerts, and a text-wrapping laboratory that shows five strategies for the unbreakable string that breaks more banners than anything else. Every bar is scoped under a .ba-NN prefix for no-collision pasting, guards prefers-reduced-motion, carries the correct aria-live and role semantics, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.
25 CSS Blockquotes
25 CSS blockquotes for article pull quotes, testimonial cards, docs callout admonitions, statement banners, and social-post embeds. Covers giant decorative quotation marks, minimalist hairline and classic left borders, animated gradient and glowing neon borders, glassmorphism and aurora backgrounds, brutalist cards, speech bubbles, thick accent rails, highlighted mark text, newspaper multi-column layouts, an expandable read-more disclosure, a scroll-snap testimonial slider, and one-click copy.

























