
SVG Wave Section Divider CSS
Published
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

Published

Published

<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.Published

Published

Published

Published

Published

<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.Published

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

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.PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated

PublishedUpdated
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.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.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.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.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.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.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 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 hand-coded CSS blockquote designs for SaaS testimonials, editorial pull quotes, documentation callouts, and developer engineering blogs: large decorative quotation marks with ::before / ::after glyphs, Tailwind CSS blockquote component, pure CSS callout / admonition boxes for Docusaurus / Mintlify / Nextra documentation, responsive center-aligned quote banners, modern minimalist left-border editorial style, animated CSS gradient border, classic left border, brutalist high-contrast, glassmorphism frosted card, glowing neon border, article pull quote with text-wrap, speech bubble chat-style, thick vertical accent rail, customer testimonial cards with avatar and star rating, inline highlighted text, marker highlight underline, floating drop-shadow, aurora gradient background, Twitter / X card style, multi-column newspaper editorial, IDE code-comment style, Markdown-compatible defaults, JavaScript testimonial quote slider, expandable read-more, and one-click copy button. 22 Pure CSS + 3 Light JS (slider, expand, copy). Every design scoped under .bq-NN prefix for no-collision pasting, prefers-reduced-motion guarded per WCAG 2.3.3, WCAG 2.2 AA accessible, framework-agnostic (React, Vue, Svelte, Astro, Next.js, Nuxt, Remix, SvelteKit).