Section Separator - Ribbon Dividers
Elegant CSS ribbon-style separators inspired by classic design patterns. Perfect for subsections and content organization.
📦 Import the Components
import SectionSeparator from "@/react/SectionSeparator/SectionSeparator.jsx";or with relative path:
import SectionSeparator from "../../react/SectionSeparator/SectionSeparator.jsx";Important: Use
.mdxextension (not.md) when working with React components.
🚀 Quick Start
<SectionSeparator />The separator automatically adapts to your theme and creates a stylish ribbon effect.
🎨 Ribbon Styles
Ribbon (Default)
Classic ribbon with arrow point:
<SectionSeparator style="ribbon" />Folded
Ribbon with 3D folded corner:
<SectionSeparator style="folded" />Notched
Sharp notched ends:
<SectionSeparator style="notched" />Bookmark
Bookmark-style pointer:
<SectionSeparator style="bookmark" />Tag
Price tag with hole:
<SectionSeparator style="tag" />Stitched
Stitched edge effect:
<SectionSeparator style="stitched" />Zigzag
Zigzag edge pattern:
<SectionSeparator style="zigzag" /><SectionSeparator style="zigzag" client:load>## THE CODE BLOCK TUTORIAL</SectionSeparator><SectionSeparator style="zigzag" color="blue" title="Welcome to my new page" />📍 Position
Control ribbon alignment:
Left (Default)
<SectionSeparator position="left" />Natural reading flow, arrow points right.
Center
<SectionSeparator position="center" />Centered ribbon, asymmetric V-cuts (left side inward, right side outward) for default, ribbon, notched, bookmark, tag, and stitched styles.
Right
<SectionSeparator position="right" />Right-aligned, arrow points left.
📏 Width
Control ribbon length:
Normal(25%) - default
<SectionSeparator />Compact accent for subtle breaks.
20% length
<SectionSeparator length={20} color="blue" />Balanced size for short title type cases.
70% length
<SectionSeparator length={70} color="purple" />Prominent divider for major subsections.
📏 height
// 20px<SectionSeparator height="thin" />// 32px (default)<SectionSeparator height="normal" />// 48px<SectionSeparator height="thick" /><SectionSeparator title="Step 1: Setup" style="folded" color="emerald" length={35}/><SectionSeparator title="Configuration" style="ribbon" color="blue" height="thick" length={30}/>📍 Markdown heading as title
Make sure to use
client:loadwhen passing markdown heading as title
<SectionSeparator style="ribbon" length={40} client:load> ## Anand wrote</SectionSeparator><SectionSeparator title="My Title" style="folded" /><SectionSeparator title="Ignored" style="stitched" client:load> ### My title</SectionSeparator>🎨 Colors
Auto (Default)
Theme-aware emerald color:
<SectionSeparator color="auto" />Preset Colors
12 beautiful color options:
Emerald • color="emerald"
Blue • color="blue"
Purple • color="purple"
Pink • color="pink"
Orange • color="orange"
Red • color="red"
Yellow • color="yellow"
Green • color="green"
Indigo • color="indigo"
Teal • color="teal"
Cyan • color="cyan"
Rose • color="rose"
Custom Hex Colors
<SectionSeparator color="#8b5cf6" /><SectionSeparator color="#f59e0b" />Light Colors for Subheadings
Perfect for section titles with good text contrast:
Open
<SectionSeparator title="Sky Blue" color="#38bdf8" length={30} /><SectionSeparator title="Violet" color="#a78bfa" length={30} /><SectionSeparator title="Rose" color="#fb7185" length={30} /><SectionSeparator title="Amber" color="#fbbf24" length={30} /><SectionSeparator title="Lime" color="#a3e635" length={30} /><SectionSeparator title="Turquoise" color="#2dd4bf" length={30} /><SectionSeparator title="Coral" color="#f97316" length={30} /><SectionSeparator title="Lavender" color="#c084fc" length={30} /><SectionSeparator title="Mint Green" color="#6ee7b7" length={30} /><SectionSeparator title="Emerald Light" color="#34d399" length={30} /><SectionSeparator title="Sea Green" color="#2dd4bf" length={30} /><SectionSeparator title="Spring Green" color="#4ade80" length={30} /><SectionSeparator title="Peach" color="#fdba74" length={30} /><SectionSeparator title="Sunset Orange" color="#fb923c" length={30} /><SectionSeparator title="Hot Pink" color="#f472b6" length={30} /><SectionSeparator title="Fuchsia" color="#e879f9" length={30} /><SectionSeparator title="Aqua" color="#22d3ee" length={30} /><SectionSeparator title="Sage Green" color="#86efac" length={30} /><SectionSeparator title="Forest Green" color="#22c55e" length={30} /><SectionSeparator title="Slate Blue" color="#60a5fa" length={30} />📐 Spacing
Tight (16px)
<SectionSeparator spacing="tight" />Minimal vertical space.
Normal (24px) - Default
<SectionSeparator spacing="normal" />Standard spacing for most content.
Loose (40px)
<SectionSeparator spacing="loose" />Extra breathing room.
⚙️ Props Reference
| Prop | Type | Default | Options |
|---|---|---|---|
style | string | ”ribbon” | ribbon, folded, notched, bookmark, tag, stitched, zigzag |
position | string | ”left” | left, center, right |
length | number | 25 | any number (calculated as percentage) |
height | string | ”normal” | thin, normal, thick |
color | string | ”auto” | auto, emerald, blue, purple, pink, orange, red, yellow, green, indigo, teal, cyan, rose, or hex |
spacing | string | ”normal” | tight, normal, loose |
title | string | "" | any text string |
children | node | - | markdown heading (requires client:load) |
💡 Usage Examples
Subsection Breaks
Organize content with visual hierarchy:
<SectionSeparator title="Introduction" /><SectionSeparator title="Getting Started" color="blue" /><SectionSeparator title="Advanced Topics" length={40} height="thick" color="purple" />Position Variations
Mix positions for creative layouts:
<SectionSeparator position="left" color="blue" style="ribbon" />Left-aligned content with arrow pointing right.
<SectionSeparator position="center" color="purple" style="folded" />Centered content for balanced design.
<SectionSeparator position="right" color="pink" style="bookmark" />Right-aligned content with arrow pointing left.
🎯 Style Showcase
All Styles in Action
Width Comparison
Position Comparison
<SectionSeparator position="left" color="emerald" length="60" title="left aligned 60% emerald" />📝 Best Practices
1. Consistent Styling
Choose 1-2 ribbon styles for your entire blog:
// ✅ Good - Consistent<SectionSeparator style="ribbon" /><SectionSeparator style="ribbon" color="blue" /><SectionSeparator style="ribbon" color="purple" />
// ❌ Inconsistent<SectionSeparator style="ribbon" /><SectionSeparator style="tag" /><SectionSeparator style="zigzag" />2. Color Meaning
Assign semantic meaning to colors:
- Blue → Information, tips
- Yellow → Warnings, cautions
- Red → Errors, important alerts
- Green → Success, go-ahead
- Purple → Premium, advanced topics
- Orange → Updates, changes
3. Position Guidelines
- Left → Best for blog posts (natural reading)
- Center → Good for formal documentation
- Right → Creative layouts, unique designs
5. Height Selection
- thin → Compact design, subtle separators
- normal → Standard size for most use cases (default)
- thick → Prominent separators for important sections
✨ Features
- ✅ 7 ribbon styles - Ribbon, folded, notched, bookmark, tag, stitched, zigzag
- ✅ 3 positions - Left, center, right alignment with smart V-cuts
- ✅ 3 height options - Thin (20px), normal (32px), thick (48px)
- ✅ 3 spacing options - Tight (16px), normal (24px), loose (40px)
- ✅ 12 preset colors + custom hex colors
- ✅ Auto theme detection - Adapts to light/dark mode
- ✅ Text support - Via
titleprop or markdown heading (withclient:load) - ✅ Pure CSS - No images, all CSS shapes and gradients
- ✅ Lightweight - Minimal performance impact
- ✅ Responsive - Works on all screen sizes
- ✅ Zigzag special - Dynamic word-based folding with gradient depth effect
🎨 Style Guide
Ribbon Styles Overview
| Style | Best For | Complexity |
|---|---|---|
| ribbon | General use, versatile | Simple |
| folded | Premium content, depth | Medium |
| notched | Modern, clean design | Simple |
| bookmark | Navigation, markers | Simple |
| tag | Labels, categories | Medium |
| stitched | Handcrafted, personal | Medium |
| zigzag | Playful, creative | Complex |
When to Use Each Style
Ribbon - Classic and versatile
<SectionSeparator style="ribbon" />Use for: General subsections, neutral content
Folded - Premium feel
<SectionSeparator style="folded" />Use for: Important sections, premium content
Notched - Modern and sharp
<SectionSeparator style="notched" />Use for: Tech blogs, minimalist design
Bookmark - Directional
<SectionSeparator style="bookmark" />Use for: Navigation hints, progress indicators
Tag - Labeled content
<SectionSeparator style="tag" />Use for: Categories, labels, prices
Stitched - Handcrafted
<SectionSeparator style="stitched" />Use for: Personal blogs, creative content
Zigzag - Playful and dynamic
<SectionSeparator style="zigzag" />Use for: Fun content, creative sections. Text displays on outer (non-gradient) zigzag folds. Minimum 3 folds, increases with word count.
Happy blogging! ✨