A tiny visual effects library

Lemon DOM

Juicy interface effects for plain HTML, CSS, and JavaScript.

No framework. No build step. Zero dependencies. Drop the CSS and JS into any page, add data attributes, and call LemonDOM.init().

Runtime
Vanilla JS
Dependencies
Zero
Build
None
Version
1.0.0 preview
Minified
20.2 KB
Gzipped
5.3 KB
Updated
2026-07-05
Live preview All effects active

Press. Glow. Release.

Glass surface, cursor bloom, tactile squeeze, and a whisper of zest — working together in one panel.

Move cursor · press and hold · release

Install

Use the local files directly.

Lemon DOM currently ships as plain CSS and JavaScript files. No npm package or public CDN build is published from this repo yet.

Local files

<link rel="stylesheet" href="lemon-dom.css">
<script src="lemon-dom.js" defer></script>

What it does

Five effects. One small API.

Each effect is opt-in via a data attribute or a method call. Mix them freely, customize with CSS variables, and keep your markup boring on purpose.

01

Glass

data-lemon-glass

Frosted surfaces with blur, soft borders, and inner light.

02

Juice

data-lemon-juice

Cursor-follow bloom using --lemon-x and --lemon-y.

03

Squeeze

data-lemon-squeeze

Tactile press feedback with subtle compression and spring.

04

Zest

data-lemon-zest

CSS-only grain for a quieter, more analog finish.

05

Peel

data-lemon-peel

Scroll-triggered reveal via IntersectionObserver.

Interactive gallery

A composed demo grid — one featured surface, focused examples, and a peel reveal waiting below the fold.

Basic usage

Two files. One init call.

Download lemon-dom.css and lemon-dom.js, link the stylesheet and script, mark up your elements, then initialize. Minified builds are available as lemon-dom.min.css and lemon-dom.min.js.

<link rel="stylesheet" href="lemon-dom.css">
<script src="lemon-dom.js" defer></script>

<article
  data-lemon-glass
  data-lemon-juice
  data-lemon-squeeze
  style="--lemon-blur: 24px; --lemon-accent: #ffe66d;"
>
  Your card content
</article>

Customize

Tune with implemented CSS variables.

Set variables globally or on individual elements.

Glass

--lemon-blur defaults to 20px; --lemon-border-opacity defaults to 0.18; --lemon-radius defaults to 20px.

Juice

--lemon-juice-size defaults to 480px; --lemon-juice-color defaults to rgba(255, 230, 109, 0.38).

Squeeze

--lemon-squeeze-scale-x, --lemon-squeeze-scale-y, and active scale variables accept unitless transform values.

Zest and Peel

--lemon-zest-opacity defaults to 0.07. --lemon-peel-duration defaults to 0.85s.

Browser support

Progressive effects, readable fallbacks.

Verified by source inspection of the current release and local static checks; broad browser claims still need real-device QA before a stable release.

Chrome, Edge, Safari, Firefox

Core rendering uses standard CSS, pointer events, and IntersectionObserver. Glass uses backdrop-filter where supported and keeps a translucent fallback where it is not.

Mobile Safari and Android Chrome

Squeeze supports touch through pointer events. Juice is pointer-specific; touch users keep the static surface without needing hover precision.

Reduced motion

prefers-reduced-motion: reduce disables squeeze transforms, peel transitions, smooth scrolling, and cursor animation transitions.

Fallback summary

Glass becomes a solid translucent panel. Peel appears without motion. Zest remains CSS-only. No polyfills are required for the documented baseline.

Credit where it's due

Inspired by Liquid DOM.

A respectful tribute

Inspired by the experimental visual direction of Liquid DOM by Andrew Prifer. Lemon DOM is a lightweight vanilla-web tribute built for practical everyday sites — not affiliated, not a clone, and not claiming feature parity.

Fallbacks

Glass degrades to a solid translucent surface without backdrop-filter. Peel, squeeze, and juice honor prefers-reduced-motion.

Get Lemon DOM

Juicy interface effects for plain websites.

Preview v1.0.0. Local-file distribution. Zero dependencies.