Liking cljdoc? Tell your friends :D

x-organic-divider

An organic, curved section divider. Creates fluid SVG-based transitions between page sections with support for multiple layered shapes, animations, and full theming.

Tag

<x-organic-divider></x-organic-divider>

Attributes

AttributeTypeDefaultDescription
shapestring"wave"Preset shape name. One of: wave, waves, blob-edge, mountain, drip, slant, scallop, cloud.
layersstring"1"Number of stacked shape layers (1-5). Multiple layers create depth.
heightstring"120px"CSS height value for the divider.
flipbooleanabsentFlips the divider vertically (curve points upward).
mirrorbooleanabsentMirrors the divider horizontally.
animationstring"none"Animation mode. One of: none, drift, morph. Respects prefers-reduced-motion. morph is disabled when path is set.
pathstring--Custom SVG path d attribute string. Overrides shape when present.

Properties

PropertyTypeReflects Attribute
shapestringshape
layersstringlayers
heightstringheight
flipbooleanflip
mirrorbooleanmirror
animationstringanimation
pathstringpath

Events

None.

Slots

None. This is a purely decorative component.

CSS Custom Properties

PropertyDefault (Light)Default (Dark)Description
--x-organic-divider-color-1rgba(99,102,241,0.15)rgba(129,140,248,0.12)Back layer fill color
--x-organic-divider-color-2rgba(99,102,241,0.25)rgba(129,140,248,0.22)Layer 2 fill color
--x-organic-divider-color-3rgba(99,102,241,0.40)rgba(129,140,248,0.35)Layer 3 fill color
--x-organic-divider-color-4rgba(99,102,241,0.60)rgba(129,140,248,0.50)Layer 4 fill color
--x-organic-divider-color-5rgba(99,102,241,0.85)rgba(129,140,248,0.70)Front layer fill color
--x-organic-divider-height120px120pxFallback height
--x-organic-divider-animate-duration6s6sAnimation cycle duration
--x-organic-divider-animate-timingease-in-outease-in-outAnimation timing function (morph only; drift always uses linear)

CSS Parts

PartDescription
baseThe outer container <div> that wraps the SVG.

Accessibility

  • Always decorative: sets role="presentation" and aria-hidden="true" on the host element.
  • The SVG element also has aria-hidden="true".

Preset Shapes

NameDescription
waveSingle smooth sine wave (default)
wavesComplex multi-undulation wave
blob-edgeOrganic irregular edge
mountainRolling hills/peaks
dripLiquid dripping stalactites
slantDiagonal cut with soft curve
scallopRepeating scalloped arcs
cloudCumulus cloud bumps

Multi-Layer System

When layers is greater than 1, multiple copies of the shape are stacked with progressive vertical and horizontal offsets, creating a layered depth effect.

  • Each layer uses a different color (--x-organic-divider-color-N).
  • Back layers are more transparent; the front layer is most opaque.
  • Default opacities (5 layers): 0.30, 0.475, 0.65, 0.825, 1.0.

Animation Modes

ValueEffect
noneNo animation (default)
driftHorizontal wave movement. Uses a wider tiled path for seamless looping.
morphShape interpolates between two path states via CSS d property animation. Only works with presets (disabled when path is set).

All animations respect prefers-reduced-motion: reduce.

Usage Examples

Simple wave divider

<x-organic-divider></x-organic-divider>

Between colored sections

<section style="background: #1a1a2e; color: white; padding: 48px;">
  Section One
</section>
<x-organic-divider shape="waves" layers="3"
  style="--x-organic-divider-color-1: #1a1a2e;
         --x-organic-divider-color-2: #16213e;
         --x-organic-divider-color-3: #0f3460;">
</x-organic-divider>
<section style="background: #0f3460; color: white; padding: 48px;">
  Section Two
</section>

Flipped divider (curve points up)

<x-organic-divider shape="mountain" flip></x-organic-divider>

Multi-layer with animation

<x-organic-divider shape="wave" layers="3" animation="drift"></x-organic-divider>

Morphing cloud divider

<x-organic-divider shape="cloud" animation="morph"
  style="--x-organic-divider-animate-duration: 8s;">
</x-organic-divider>

Custom height and colors

<x-organic-divider shape="scallop" height="80px"
  style="--x-organic-divider-color-1: rgba(236,72,153,0.6);">
</x-organic-divider>

Custom SVG path

<x-organic-divider
  path="M0,80 L400,20 L800,80 L1200,20 L1200,120 L0,120 Z">
</x-organic-divider>

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close