GitHub

Command Palette

Search for a command to run...

Components/Layout/Separator

Separator

Layoutinline sandbox

An interactive separator with a wobbling string animation. The line bends toward the mouse cursor and oscillates with a satisfying spring effect when released.

separator
divider
wobble animation
interactive separator
physics animation

Preview

Adjust damping (lower = more bouncy) and frequency to customize the wobble feel.

Uses GSAP for smooth, performant animations.

Installation

Use the shadcn CLI to install this component:

npx shadcn@latest add https://messyui.dev/r/separator.json

Props

PropTypeDefaultDescription
baseYnumber50Vertical position of the line in viewbox units (0-100)
maxDisplacementnumber40Maximum distance the line can bend from center
hoverZoneHeightnumber100Height of the hover detection zone in pixels
strokeWidthnumber2Thickness of the separator line
dampingnumber0.15Damping factor (0-1, lower = more oscillations)
frequencynumber8Oscillation frequency (higher = faster wobble)
durationnumber1.5Duration of the wobble animation in seconds
classNamestring""Additional CSS classes for custom styling (e.g., width control)

Related Components