Repository navigation
Blocks Section Divider
Version: 1.0.0 Category: Design Keywords: divider, shape, separator, wave, section
The Section Divider Block is a standalone shape divider you can drop between any two blocks. It reuses the same shape library and theme-inheritance mechanism as the Section block's built-in top/bottom shape dividers, but is a separate block you can place anywhere in the content flow — not pinned to a Section's edge.
How it differs from a Section's edge dividers:
- A Section's
shapeDividerTop/shapeDividerBottomattributes render a see-through knockout cut into the section's own top/bottom edge — they reveal whatever sits behind the section, not a filled shape. - Section Divider is a solid-filled shape, painted as its own block. It needs a fill color (from an attribute, a theme token, or the plugin default) because there's no "behind" for it to reveal.
Both mechanisms are independent — using one doesn't disable or replace the other. See docs/plans/2026-07-06-section-divider-block-design.md for the original design rationale.
- Insert the Section Divider block between two other blocks (found in the Design category).
- Choose a Shape from the settings panel, or leave it at Theme default.
- Set a Fill color, or leave it unset to inherit the theme's divider color.
- Adjust Height, Width, and flip options as needed.
-
Shape —
Theme default(the block'sinheritvalue) or one of 29 shape slugs (Wave, Wave Double, Tilt, Curve, Triangle, Zigzag, Clouds, Drops, Steps, Torn Paper, and more). There's no "None" option — to remove a divider, delete the block. -
Height — 10–500px via the slider; values outside that range can still be set (e.g. via a pattern) and are used as-is, unlike the Section block's edge dividers, which clamp. Leaving it unset (
Reset) inherits the theme's divider height. -
Width — 100–300% horizontal stretch; also unclamped if set outside that range programmatically. Unset inherits the theme's divider width. An explicit
100%is preserved rather than treated as "unset," so you can pin a divider against a theme token that specifies something else. - Flip horizontal / Flip vertical — mirror the shape.
Under the block's Color panel:
- Background — the color behind/around the masked shape (transparent by default, so whatever sits behind the block shows through).
- Fill — the color of the shape itself. Unset inherits the theme token, then falls back to the theme's base color.
- Alignment: Wide, Full (defaults to Full on insert).
- Anchor: Yes.
- Spacing: Margin only.
- Editing raw HTML for this block is disabled.
All three pieces resolve purely in CSS, from most to least specific, so a theme or Style Kit can change the plugin-wide default without touching any saved content:
Token (settings.custom.designsetgo.*) |
CSS custom property | Fallback |
|---|---|---|
shapeDivider.type |
--wp--custom--designsetgo--shape-divider--type |
wave |
shapeDivider.height |
--wp--custom--designsetgo--shape-divider--height |
100px |
shapeDivider.width |
--wp--custom--designsetgo--shape-divider--width |
100% |
shapeDivider.color |
--wp--custom--designsetgo--shape-divider--color |
--wp--preset--color--base |
shapeDivider.type is shared with the Section block — a kit that sets the default shape for Section's edge dividers sets it for this block too. height, width, and color are also block-agnostic but are new as of this block; nothing else currently consumes them. The plugin ships no theme.json itself — these tokens only take effect when a theme or Style Kit defines them; without one, the fallbacks above apply.
Drop a subtle wave or tilt divider between a text section and an image gallery, without wrapping either in a Section block.
Place a small divider inside a core/group or Card to separate a header from body content.
Leave Shape, Height, and Fill all unset so every divider on the site automatically follows the active theme/kit's divider tokens; only override per-instance when a design intentionally departs from it.
DO:
- Leave Shape/Height/Fill at their theme-inherited defaults unless a specific divider needs to look different — this keeps the site consistent and keeps saved markup minimal.
- Use Background (not Fill) if you want colored space around a narrower shape (e.g. an asymmetric or triangle shape) rather than a colored shape.
DON'T:
- Stack many differently-shaped dividers back to back — it reads as visual noise rather than a section break.
- Confuse this block with Section's edge shape dividers when a section-edge effect (background knockout) is what's actually needed — reach for Section's own
shapeDividerTop/shapeDividerBottomsettings for that.
The divider is purely decorative: the shape element is marked aria-hidden="true" and carries no text, so it's skipped entirely by assistive technology. There's nothing to focus and no keyboard interaction.
Markup (fully default divider — no inline style at all):
<div class="wp-block-designsetgo-section-divider alignfull">
<div class="dsgo-section-divider__shape dsgo-shape-divider is-shape-inherit" aria-hidden="true"></div>
</div>With overrides, only the changed custom properties are emitted:
<div class="wp-block-designsetgo-section-divider alignfull" style="--dsgo-section-divider-bg:...">
<div class="dsgo-section-divider__shape dsgo-shape-divider is-shape-wave"
style="--dsgo-section-divider-fill:...;--dsgo-shape-height:120px;--dsgo-shape-flip-x:-1"
aria-hidden="true"></div>
</div>Shared code: src/blocks/section-divider/utils/index.js re-exports getShapeDividerOptions()/getShapeDivider() from ../../section/utils/shape-dividers.js (the single source of truth for the shape slug list) and owns getDividerStyle(), getDividerShapeClass(), and getDividerWrapperStyle() — the same three helpers back both edit.js and save.js, so the editor canvas and frontend output can't drift. The mask data-URIs and the is-shape-* → --dsgo-shape-mask mapping live in src/styles/shared/_shape-mask-classes.scss and _shape-masks.scss, shared with the Section block's own edge dividers. The height/width fallback cascade lives in src/styles/shared/_shape-size.scss, also shared.
Nullable size handling: height/width use isExplicitShapeSize() (src/utils/shape-size.js) rather than a plain typeof value === 'number' check, so 0, negative numbers, and NaN are all treated as "unset" (they'd otherwise serialize a meaningless value like --dsgo-shape-height:NaNpx).
Tests: src/blocks/section-divider/test/save.test.js — covers the bare-inherit default, per-attribute var emission, preset-color-to-CSS-var conversion, and the zero/negative/NaN-size guard.
No deprecations: this is a new block with no prior markup to migrate.
Auto-generated from
docs/blocks/SECTION-DIVIDER.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Advanced Heading
- Blobs
- Breadcrumbs
- Card
- Chart
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Dynamic Image
- Fifty Fifty
- Flip Card
- Form Builder
- Grid
- Hotspot
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Trigger
- Pill
- Product Categories Grid
- Product Showcase Hero
- Progress Bar
- Query
- Query Filter
- Query Group Header
- Query No Results
- Query Pagination
- Query Results
- Row
- Scroll Accordion
- Scroll Marquee
- Scroll Slides
- Section
- Section Divider
- Slider
- Star Rating
- Sticky Sections
- Table Of Contents
- Tabs
- Text Path
- Timeline
- Background Video
- Block Animations
- Clickable Group
- Conditional Visibility
- Custom Css
- Draft Mode
- Dynamic Tags
- Expanding Background
- Grid Mobile Order
- Grid Span
- Hover Effects
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Style Binding
- Svg Patterns
- Text Alignment Inheritance
- Text Reveal
- Abilities Api
- Abilities Api Guide
- Block Bindings
- Draft Mode Api
- Form Webhooks
- Generation Contract
- Interactive Blocks
- Layout Flexibility
- Markdown Content Negotiation
- Rest Api Reference
- Wp Cli Reference
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Deploying To Wordpress Org
- Design System
- 2026 04 16 Blocks Editor Ux Design
- 2026 04 17 Theme 3 Inspector Ia
- 2026 04 21 Query Block Onboarding
- 2026 04 21 Query Capable Layout Blocks Design
- 2026 04 27 Block Roadmap Ideas
- 2026 07 01 Shape Divider Theme Inheritance
- 2026 07 02 Icon Block Dynamic Render Pilot
- 2026 07 06 Section Divider Block Design
- 2026 07 06 Section Style Variations Fse Design
- 2026 07 06 Section Styles Editor Preview
- 2026 07 07 Row Grid Overlay Hover Parity Design
- 2026 07 21 Conditional And Dup Label Sourcing
- 2026 07 23 Theme Block Type Animation Defaults
- 2026 08 16 Chart Block
- 2026 08 16 Greenshift Gap Roadmap
- 2026 08 17 Woocommerce Surface
- 2026 08 24 Loop Carousel
- 2026 08 24 Star Rating Block
- 2026 09 17 Abilities Drift Prevention
- 2026 09 17 Abilities Drift Prevention Implementation
- 2026 09 29 Existing User Regression Fixes
- 2026 09 29 Release Preflight Fixes
- Readme
- 2026 07 02 Block Authorability Audit
- 2026 09 29 Regression Fixes
- 2026 09 29 Release 2.9.0
- 2026 09 29 Release Fixes
- 2026 10 19 Bug Hunt
- 2026 10 20 Bug Hunt Round 2