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
.mdx
extension (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" />
📍 Position
Control ribbon alignment:
Left (Default)
<SectionSeparator position="left" />
Natural reading flow, arrow points right.
Center
<SectionSeparator position="center" />
Centered ribbon, arrows on both ends (for ribbon/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:load
when 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" />
📐 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 |
width | string | ”medium” | short, medium, long, full |
color | string | ”auto” | auto, emerald, blue, purple, pink, orange, red, yellow, green, indigo, teal, cyan, rose, or hex |
spacing | string | ”normal” | tight, normal, loose |
💡 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 → Suitable for lengthy ribbon without title or for section completion
- normal → Standard/default width
- thick → Important subsections
✨ Features
- ✅ 7 ribbon styles - Inspired by CSS ribbon patterns
- ✅ 3 positions - Left, center, right alignment
- ✅ 2 height options - thin, normal & thick
- ✅ 12 preset colors + custom hex colors
- ✅ Auto theme detection - Adapts to light/dark mode
- ✅ Pure CSS - No images, all CSS shapes
- ✅ Lightweight - Minimal performance impact
- ✅ Responsive - Works on all screen sizes
🎨 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
<SectionSeparator style="zigzag" />
Use for: Fun content, children’s themes
Happy blogging! ✨