Wobble

A zero-dependency SVG displacement wrapper for giving text, media, and annotations an organic printed edge.

Installation

Live field

Field note · issue 08Ideas need rough edges.Fractal noise bends the rendered pixels while the document structure stays put.

The original three controls map directly to feDisplacementMap strength and feTurbulence frequency and octaves. Seed adds a stable way to vary the texture between instances.

With NeatAnnotation

Copy review

Ship after the reviewone final pass.

Visual QA

Keep the human edgeintentionally uneven.

Put Wobble inside NeatAnnotation when only the target should distort. The annotation arrow, note, layout bounds, and accessible description remain crisp and stable.

Tuning and fallback

distortedplain

Start near the 2 / 0.05 / 2 defaults. Large areas and high octave counts cost more to render. Forced-colors and print output automatically remove the distortion without hiding the content.

Accessibility

Wobble changes pixels only: child text, links, controls, names, and descriptions stay in the accessibility tree. Keep strength low on dense text so the visual treatment does not reduce legibility, and use disabled when the surrounding state calls for an unfiltered presentation.

API Reference

PropTypeDefaultDescription
childrenReactNodeInline content, media, or another component receiving the SVG filter.
strengthnumber2Displacement distance, clamped from 0 to 40 SVG units.
frequencynumber0.05Noise density, clamped from 0.001 to 0.5. Lower values make broader bends.
octavesnumber2Noise detail passes, rounded and clamped from 1 to 5.
seednumber0Stable integer variation of the noise field, clamped from 0 to 999.
filterMarginnumber20Extra filter region around the target, measured as a percentage of its bounds.
disabledbooleanfalseKeeps the wrapper and child semantics intact while removing the visual filter.
className / stylestring / CSSPropertiesNative span styling. Set display to block when wrapping full-width media.

Credits

The visual technique is inspired by Wobble by wehwayne2. The Pen does not publish an explicit source-code license, so this component independently reimplements the effect with standard SVG primitives rather than redistributing its code.