atelier-fx
Open source · MIT

Motion, cut to measure.

Twelve hand-finished effects for premium websites. Add one attribute to your HTML and ship 3.7 KB of JavaScript.

npm i atelier-fx Star on GitHub
3.7 KB JS, gzipped 2.1 KB CSS, gzipped 0 dependencies Respects reduced motion and touch
data-fx="glass"

Liquid glass

A frosted panel with a bright top edge and a highlight that follows the cursor. On phones it keeps the frosted look without tracking.

  • --af-glass-blur how frosted it is
  • --af-glass-sheen highlight colour
  • --af-glass-radius corner radius
Fitting ticket

Look 07, second fitting

Bust
88 cm
Waist
68 cm
Hem allowance
4 cm
Fabric
Silk faille
<div data-fx="glass">…</div>
data-fx="draw"

Self-drawing line art

Any SVG illustration draws itself stroke by stroke when it scrolls into view. No measuring paths, no timeline to set up.

  • data-af-stagger seconds between strokes
  • data-af-duration seconds per stroke
<svg data-fx="draw" data-af-stagger="0.12">
  <path d="…" />
</svg>
data-fx="reveal"

Masked reveals

Headings rise out of a mask word by word, or letter by letter. Inline markup like em survives, and screen readers hear the full sentence once.

  • data-af-split words or chars
  • data-af-stagger seconds between pieces

Autumn atelier

Every seam finished by hand.

<h2 data-fx="reveal">Every seam finished <em>by hand.</em></h2>
<p data-fx="reveal" data-af-split="chars">Autumn atelier</p>
data-fx="foil"

Foil text

A slow metallic sweep across type, like light moving over a foil-stamped invitation. Pure CSS, so it costs nothing to run.

  • --af-foil-shine highlight colour
  • --af-foil-deep shadow colour
  • --af-foil-speed one full sweep

Couture

<h1 data-fx="foil" style="--af-foil-shine:#f1d9a7">Couture</h1>
data-fx="spotlight" · data-fx="tilt"

Spotlight and tilt

A soft light follows the cursor through dark sections, and cards lean toward it with a slight magnetic pull. Combine effects by listing them in one attribute.

  • data-af-tilt max rotation in degrees
  • data-af-pull magnetic drift in px
  • --af-spot-color light colour
Silk faille112 cm width
Wool crepe150 cm width
Duchesse satin140 cm width
<section data-fx="spotlight">
  <div data-fx="tilt" data-af-tilt="8">…</div>
</section>
data-fx="curtain"

Curtain

A panel pulls away to unveil an image or video, which settles from a slight zoom. Runs on page load or when it scrolls into view.

  • data-af-direction up, down, left, right
  • data-af-trigger view or load
  • --af-curtain-color panel colour
Look 07Silk faille · 112 cm
<figure data-fx="curtain" data-af-direction="left">
  <img src="look-07.jpg" alt="…">
</figure>
New in 0.2

Five more finishes

The quieter details that make a page feel expensive.

data-fx="marquee"Seamless ticker. Pauses on hover.
Silk faille Wool crepe Duchesse satin Organza Cashmere
data-fx="count"Counts up in view, keeps symbols.
Gzipped, all twelve
3.7 KB
Hand stitches per gown
12,400+
Couture price
₹4,80,000
data-fx="grain"Moving film grain, pure CSS.
Without
With grain
data-fx="progress"A thread that fills as you read.

The champagne line under the header is this effect. Scroll and watch it fill.

<div data-fx="progress"></div>
data-fx="video"Plays only on screen.

Background films pause off-screen and in hidden tabs, and never autoplay on data saver or for reduced-motion visitors. Your hero film stops costing battery.

<video data-fx="video" src="film.mp4" loop></video>

Made with atelier-fx

Sites using atelier-fx appear here. Launched one? Send the link and it goes on the rail.

Three ways in

From a CDN

Drop two tags in, and every data-fx on the page comes alive.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/atelier-fx/dist/atelier-fx.min.css">
<script src="https://cdn.jsdelivr.net/npm/atelier-fx" defer></script>

With a bundler

Works with Vite, Next.js, Astro and anything that speaks ES modules.

import { init } from 'atelier-fx';
import 'atelier-fx/style.css';

init();

In React

A component and a hook that clean up on unmount.

import { FX } from 'atelier-fx/react';

<FX as="h1" fx="reveal">
  Every seam finished by hand.
</FX>

Building in Webflow, Framer, WordPress or Shopify? Paste the CDN tags into your head code and add data-fx as a custom attribute. Step-by-step guides

Kind to every visitor

Reduced-motion users see the finished page instantly. Touch devices skip cursor effects.

Nothing to fight

Effects add classes and CSS variables only, so your own styles stay in charge.

Fast by default

Only transforms and opacity animate, and nothing runs until it is on screen.