Guide.

How to use Cauce in a project: CSS tokens, GSAP, Web Animations, physics that can be interrupted, the impulse, choreography, scroll, gestures, the eleven patterns and reduced motion. This is the package’s real API.

Introduction

Cauce is Flouvia’s motion system: eight named springs, a six-step duration scale and three bounces. Everything comes from a single source, springs.ts, which generates the CSS tokens, the GSAP presets, the JavaScript physics and the W3C tokens, so they never drift apart.

Nothing moves on a hand-drawn curve: no cubic-bezier, no GSAP eases, no loose durations. If a movement has no piece, it uses a spring from the scale.

The package

Cauce is @flouvia/cauce, currently at version 0.1.0. It’s private until v1, when it arrives on npm under the MIT license, like Gota. This is what it includes and how it’s imported.

TypeScript
import { SPRINGS, tween, impulse, stagger, after, PATTERNS, SpringValue, follow, drag, release } from '@flouvia/cauce';

import { tween, impulse } from '@flouvia/cauce/springs';
import { stagger, after, during } from '@flouvia/cauce/choreography';
import { PATTERNS, tideDome } from '@flouvia/cauce/patterns';
import { SpringValue } from '@flouvia/cauce/physics';
import { drag, project, release } from '@flouvia/cauce/gesture';
  • @flouvia/cauce: the whole API in one import.
  • @flouvia/cauce/springs: the pieces, the scale, the bounces, the impulse and the physics of the curve.
  • @flouvia/cauce/choreography: a group’s step, waits and distance.
  • @flouvia/cauce/patterns: the numbers and math of the eleven patterns and of Gota’s gestures.
  • @flouvia/cauce/native: Cauce on the platform, with no libraries.
  • @flouvia/cauce/physics: SpringValue and follow.
  • @flouvia/cauce/gesture: gestures, drag, release and their physics.
  • @flouvia/cauce/motion.css: the CSS tokens, for Tailwind v4.
  • @flouvia/cauce/tokens.json: Cauce in the W3C design tokens format.
  • @flouvia/cauce/ts: the TypeScript source, for those who prefer to compile it.

CSS and Tailwind

motion.css uses Tailwind v4’s @theme and @utility, so it’s imported from your Tailwind stylesheet.

CSS
@import 'tailwindcss';
@import '@flouvia/cauce/motion.css';

Each piece is a curve (--ease-drop, the curve as linear()), its real duration (--duration-drop, how long it takes to settle) and a utility that sets both (spring-drop).

HTML
<button class="transition-transform spring-drop hover:scale-104 motion-reduce:scale-100!">
  Hablemos
</button>

In a keyframe or a rule of your own, the two variables:

CSS
.sheet {
  transition: translate var(--duration-sheet) var(--ease-sheet);
}

.card {
  animation: enter var(--duration-rise) var(--ease-rise) both;
}

On the platform

Cauce moves a complete interface with what the browser already provides, with no libraries: Web Animations with each piece’s curve as linear(), IntersectionObserver for what comes into view and a reading of the scroll for what follows it. @flouvia/cauce/native brings it together.

TypeScript
import { crossing, enter, follow, inView, scene, scrollProgress, stagger, to, TRAVEL } from '@flouvia/cauce';

inView(cards, (batch) => {
  const step = stagger('rise', batch.length);
  batch.forEach((card, i) => {
    enter(card, { opacity: '0', transform: `translateY(${TRAVEL}px)` }, 'rise', i * step, { opacity: '1' });
  });
});

to(panel, { transform: 'translateX(0)' }, 'sheet');

const track = follow(scene([{ el: bar, keyframes: [{ transform: 'scaleX(0)' }, { transform: 'scaleX(1)' }] }]));
scrollProgress(section, 'top 60%', 'bottom 75%', (progress) => track({ progress }));

crossing(chapters, 0.4, (chapter, inside) => chapter.classList.toggle('is-current', inside));
  • enter(el, from, piece, delay): enters from a state to its own style. While it waits for its turn it holds the starting state; when it ends, nothing stays on top.
  • to(el, target, piece): takes an element from where it is to its target. If it was already moving, it continues from there.
  • inView(elements, onEnter): fires once, in groups and in order, when each element crosses 88% of the window. What has already scrolled past counts too.
  • crossing(elements, line, onChange): fires when an element enters or leaves a line of the window, like the index that lights up with the section being read.
  • scrollProgress and scene: what follows the scroll, with follow and drift.
  • animateValue: a number frame by frame, for a CSS variable, a WebGL uniform or the scroll.
  • draw: an SVG stroke that draws from start to end.

flouvia.com, its portal and Ops move this way: no page downloads an animation library when it opens. Long pinned scenes use GSAP as an adapter, with tween.

GSAP

For long pinned scenes, tween() returns a spring’s duration and curve, ready to spread into the tween: the duration is how long it takes to settle. A cascade’s step and the wait between two movements come from the choreography: stagger, after and during.

TypeScript


import { spring, stagger, tween } from '@flouvia/cauce';import { gsap } from 'gsap';

gsap.to(card, { opacity: 1, y: 0, ...tween('rise') });
gsap.to(words, { opacity: 1, y: 0, scale: 1, ...tween('bloom'), stagger: stagger('bloom', words.length) });
gsap.to(path, { strokeDashoffset: 0, ...tween(spring('scene')) });

Web Animations

With animate(), the duration comes from settle and the curve from cssLinear. Whatever should happen once it looks complete, like changing the page once the drop covers, waits for reach, not for the spring’s invisible tail.

TypeScript
import { cssLinear, reach, settle } from '@flouvia/cauce';

drop.animate(
  { transform: ['scale(0.02)', 'scale(1)'] },
  { duration: settle('flood') * 1000, easing: cssLinear('flood'), fill: 'both' },
);

setTimeout(() => location.assign(href), reach('flood', 0.985) * 1000);

linear() is available since Safari 17.2, Chrome 113 and Firefox 112. In a browser without it, cssLinear returns the closest cubic-bezier so the animation still runs.

What can be interrupted

A CSS transition or a tween stops dead if you change its destination. SpringValue is a number with physics: if the destination changes midway, it carries on from where it was, with its velocity. That’s how the menu’s circle moves.

TypeScript
import { SPRINGS, SpringValue } from '@flouvia/cauce';

const radius = new SpringValue(0, (r) => {
  menu.style.clipPath = `circle(${r}px at ${x}px ${y}px)`;
}, SPRINGS.flood);

radius.to(full);
radius.to(0, SPRINGS.sheet);
NameSignature or valuesWhat it does
new SpringValue (value, onChange, spring)The number, the function that paints it every frame and its spring.
.to (target, spring?, onRest?)Heads to the target without losing the velocity it had; the spring’s velocity, if any, is added. onRest is called once it settles.
.set (value)Jumps to the value without animating.
.stop ()Stops where it is.
.value · .velocity numberWhere it is and how fast it’s going, to read them or to release it with a gesture’s velocity.

The impulse

What leaves its place and comes back to it, like a bell that rings or a heart that beats, is an impulse: a spring’s response to a kick of velocity, with its destination in the same place. What goes to a destination is never an impulse: it uses a piece.

Send

still · 753 ms

Bell

ripple · 1293 ms

Heartbeat

splash · 1741 ms

Tap each one. While it moves, another tap doesn’t count.

It has three bounces of its own, because what comes back feels different from what arrives. Each one says how far it swings past its place to the other side, measured against its first peak.

NameSignature or valuesWhat it does
still 0 · doesn’t swing pastLeaves and comes back without oscillating: send.
ripple 0.6 · 25.4 % to the other sideWhat rings or arrives: the bell, the arrow that drops.
splash 0.7 · 37.2 % to the other sideWhat beats or insists: the heartbeat, the wiggle, an error’s shake.

impulseFrames gives its shape as evenly spaced frames, from 0 to 0, that run in any browser (even without linear()) and work just as well for an @keyframes; impulseSettle, how long it takes to come to rest. This is how the bell rings:

TypeScript
import { GESTURES, impulseFrames, impulseSettle } from '@flouvia/cauce';

const { spring, amplitude } = GESTURES.ring;
const frames = impulseFrames(spring).map((v, i, all) => ({ rotate: `${amplitude * v}deg`, offset: i / (all.length - 1) }));

bell.addEventListener('click', () => {
  if (bell.getAnimations().length) return;
  bell.animate(frames, { duration: impulseSettle(spring) * 1000 });
});
NameSignature or valuesWhat it does
impulse (duration, bounce = 'still')An impulse from the scale by its names: impulse('medium', 'ripple') is the bell.
IMPULSE still 0 · ripple 0.6 · splash 0.7The impulse’s three bounces.
impulseFrames (impulse, samples = 60)The shape as frames: 0 at rest, 1 at its first peak and 0 once it’s still.
impulseCurve (impulse)The same shape as a function of progress, from 0 to 1.
impulseSettle (impulse)Seconds until it’s within 0.2 % of its first peak: the animation’s duration.
GESTURES ring · beat · slide · bounce · wiggle · shake · spin · drawGota’s gestures, each with its spring and its amplitude: its first peak, in degrees, scale or px.
  • An impulse that’s still moving isn’t replayed: another kick while it moves doesn’t count.
  • Once, when something happens: never on a loop to call for attention.
  • With reduced motion it doesn’t move. What it says also shows: with color, with text or with its state.
  • At Flouvia, Gota’s gestures and the shake of a wrong code at sign-in (GESTURES.shake).

Choreography

How a group moves: in what order, at what pace and in which direction. It all comes from the pieces: no step or wait is written by hand.

The contents enter at 465 ms, once the sheet has arrived: 9 items, one every 50 ms; the cascade lasts 400 ms.
  • The stagger is tied to its piece: stagger(piece, n) is the piece’s duration divided by 16 (rise 50 ms, bloom 37.5, sheet 31.25, drop 21.875). Past 16 items the step shortens, so a cascade never outlasts its piece.
  • Only what’s visible cascades: what has already gone by appears in place.
  • The main thing first: the title, the text, the action and the rest. If a touch set it off, from the touch.
  • Sequences are joined by the spring: the next thing enters after(piece), once the previous one looks complete (98 %: sheet, 465 ms), or during(piece), once it can be seen arriving (80 %: sheet, 239 ms).
  • One distance: what enters travels TRAVEL, 16 px. The named exception is brand headlines (surface).
  • There and back: what leaves disappears together, on ebb; what returns to its origin travels on sheet.
  • Whatever follows the scroll follows it on drift (follow): nothing sticks.
  • With reduced motion, everything fades in together in FADE.
TypeScript
import { gsap } from 'gsap';
import { after, stagger, TRAVEL, tween } from '@flouvia/cauce';

const items = [title, text, action, ...rows];

gsap.fromTo(sheet, { yPercent: 100 }, { yPercent: 0, ...tween('sheet') });
gsap.fromTo(items, { opacity: 0, y: TRAVEL }, {
  opacity: 1,
  y: 0,
  ...tween('rise'),
  stagger: stagger('rise', items.length),
  delay: after('sheet'),
});

gsap.to([sheet, ...items], { opacity: 0, ...tween('ebb') });
NameSignature or valuesWhat it does
stagger (piece | spring, n)The step between the items of a cascade, in seconds: the piece’s duration divided by 16 or, past 16, by n.
after (piece | spring)Seconds until the previous thing looks complete (98 %): that’s when the next one enters.
during (piece | spring)Seconds until the previous thing can be seen arriving (80 %): the next one enters over it.
TRAVEL 16How far what enters travels, in px.
STEPS 16How many steps fit in a piece.
AFTER · DURING 0.98 · 0.8The levels of after and during.

Scroll

Whatever follows the scroll follows it on drift: the scene catches up with it on a spring instead of sticking to it. follow goes in the onUpdate of a ScrollTrigger without scrub; the first reading jumps without animating, so a reload halfway down the page doesn’t see the scene run.

TypeScript
import { gsap } from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
import { follow } from '@flouvia/cauce';

const scene = gsap.to(track, { x: () => -distance(), ease: 'none' });

ScrollTrigger.create({ trigger: section, start: 'top top', end: '+=200%', pin: true, onUpdate: follow(scene) });

Nothing sticks to the scroll: not the cover that sinks (crest), not the footer that rises from depth (recede), not a frame sequence. A scene with its own progress() moves with follow too. The only direct thing is the scroll itself: the page the hand drags carries no spring.

Gestures

What makes an interface feel alive is motion that follows the hand: what you drag comes with you, what you throw keeps your speed and the edge gives like rubber. Cauce brings it in @flouvia/cauce/gesture.

Drag it and let go, or throw it: it keeps your speed. Pull past an edge and it gives like rubber. On a keyboard, the arrow keys.
Hand velocity
0 px/s
Settles at
Center

drag binds an element to Pointer Events: mouse, trackpad, finger and pen. A tap is still a click; past the threshold it captures the pointer, tells you how far the hand moved and, on release, how fast it was going over its last 100 ms. With an axis, its touch-action leaves the other one to scrolling.

On release, project works out where a throw would land with natural deceleration, nearest picks the resting point and release hands the hand’s velocity to the SpringValue: the spring starts with it. If you grab it mid-animation, stop() holds it where it is and the gesture carries on from there. This is how a sheet is pulled down to close it:

TypeScript
import { drag, nearest, project, release, rubberClamp, SpringValue, SPRINGS } from '@flouvia/cauce';

const height = sheet.offsetHeight;
const y = new SpringValue(0, (v) => {
  sheet.style.translate = `0 ${v}px`;
}, SPRINGS.sheet);
let from = 0;

drag(sheet.querySelector('header'), {
  axis: 'y',
  onStart: () => {
    y.stop();
    from = y.value;
  },
  onMove: ({ dy, reduced }) => {
    y.set(reduced ? Math.max(0, from + dy) : rubberClamp(from + dy, 0, height, height));
  },
  onEnd: ({ vy, reduced }) => {
    const target = nearest(project(y.value, vy), [0, height]);
    release(y, target, { velocity: vy, spring: target ? SPRINGS.ebb : SPRINGS.sheet, reduced, onRest: target ? close : undefined });
  },
});
NameSignature or valuesWhat it does
drag (element, { axis?, threshold = 4, touchAction?, capture = true, filter?, onStart?, onMove?, onEnd? })Binds the element to the gesture and returns the function that unbinds it. Each call receives { x, y, dx, dy, vx, vy, reduced, pointerType, event }; onEnd arrives with the hand’s velocity (0 if the system canceled the pointer). A native range, which already captures the pointer, passes capture: false.
rubberband (overflow, dimension, constant = 0.55)What shows past the limit: it grows less and less and never reaches the dimension. The formula: (1 − 1 / (x · c / d + 1)) · d.
rubberClamp (value, min, max, dimension, constant?)The value with rubber edges: inside it passes as is; outside, it gives.
project (position, velocity, rate = DECELERATION.normal)Where a throw comes to rest: position + (velocity / 1000) · rate / (1 − rate).
DECELERATION normal 0.998 · fast 0.99UIScrollView’s deceleration rates, per millisecond.
nearest (position, points)The closest resting point: open or closed, one end or the other.
VelocityTracker .add(position, ms?) · .velocity(ms?) · .reset()The hand’s velocity over the last 100 ms, by least squares; 0 if it held still before letting go.
release (value, target, { velocity?, spring?, onRest?, reduced? })The handoff: the SpringValue heads for the target starting with the hand’s velocity. With reduced, it arrives directly.
  • A gesture is never the only way to do something: the keyboard, Escape and buttons do the same.
  • While you drag it, it sticks to your hand, without a spring; the spring starts when you let go.
  • With reduced motion it doesn’t give or fly: it follows the hand and, on release, arrives directly or fades.
  • At Flouvia, the range’s drop gives at its ends, portal and Ops sheets are pulled down to close them and the phone menu closes with a swipe.

Eleven patterns

A pattern is a named moment made of pieces: changing pages, opening the menu, a brand headline. Its numbers and math live in @flouvia/cauce/patterns, and every interface animates it in its own DOM with those measurements, never its own.

WhenWhat to use
Changing pages. tide
Opening a case from a row. spill
Opening the menu. well
A brand headline. surface
A sentence worth reading. soak
A link under a pointer. roll
A case’s cover. crest
A list that writes itself. wake
The end of the page. recede
A card that becomes the workspace. swell
A sheet that comes in and leaves. sink
  • Each pattern has a name of its own, in English in every language.
  • A pattern is for its moment: it’s never decoration and never mixed with another.
  • With reduced motion, none of them travel: what navigates navigates without animation and the rest fades in place in 200 ms.
  • Each spec says which Onda sound goes with it. What arrives on its own is silent.

tide

The transition between pages: a panel in the brand color rises from the bottom, covers the page that leaves and uncovers the one that arrives. It says you changed places without losing the thread.

Services

The dome follows the panel’s speed, up to 12 % of the height, and the page changes at 440 ms, once the corners cover.
When
When following a link to another page of the same site.
When not
Anchors on the same page, external links or links to another tab, downloads, and whatever already has its own exit, like the handoff to a case or the language switch.
Where it starts
At the bottom edge of the window, with its dome at the center.
Pieces and timing
It rises on flood. Its dome follows the panel’s speed: almost nothing as it starts, up to 12 % of the height at its fastest and nothing as it brakes. It navigates once the corners cover, at 440 ms; the rest of the spring runs covered. On the new page the panel keeps rising and its bottom edge hangs like a drop.
If interrupted
It isn’t interrupted: a second click while it rises doesn’t count and the first destination wins. Coming back with the back button, the page arrives uncovered.
Reduced motion
It navigates without the panel.
Sound
The link’s tap; the panel itself is silent.
API
PATTERNS.tide (piece, dome), tideDome(t) and tideCover().
TypeScript
import { curve, PATTERNS, settle, tideCover, tideDome } from '@flouvia/cauce';

const run = settle(PATTERNS.tide.piece);
const progress = curve(PATTERNS.tide.piece);
const frames = Array.from({ length: 97 }, (_, i) => {
  const at = i / 96;
  const dome = `50% ${tideDome(at * run) * 100}vh`;
  return {
    transform: `translateY(${(1 - progress(at)) * 100}%)`,
    borderTopLeftRadius: dome,
    borderTopRightRadius: dome,
    offset: at,
  };
});

panel.animate(frames, { duration: run * 1000, fill: 'both' });
setTimeout(() => location.assign(href), tideCover() * 1000);

spill

The handoff to a case: the pointer becomes a drop in the case’s tone that grows until it covers the screen. The page that arrives is born in that tone: there’s no cut between the row and its cover.

Tap a row: the drop is born where you tapped, at 18 px, and the page changes at 401 ms.
When
When opening something with a tone of its own from a list: a row of work that leads to its case.
When not
A destination without a tone that carries over, or an ordinary link: that’s tide. It only answers a primary click with no modifier keys; everything else opens as usual.
Where it starts
Where the pointer is, at its size (18 px). From the keyboard, from the row’s arrow; on touch, under the finger.
Pieces and timing
It grows on flood and its bottom-right corner straightens on sheet until it takes the shape of Flouvia’s logomark. It navigates at 98.5 % of flood, at 401 ms; its bounce makes it bigger than the screen, where it already covers.
If interrupted
It isn’t interrupted: while it grows, another click doesn’t navigate. Coming back with the back button, the drop withdraws and the pointer returns.
Reduced motion
It navigates without the drop.
Sound
The row’s tap.
API
PATTERNS.spill (piece, corner, origin, navigate).

well

The menu: a circle grows from its button until it covers the screen, and each link rises as the edge reaches it. It says where the menu came from and where it goes back to.

Each link rises as the edge reaches it. Close it halfway: it carries on from where it was, with its velocity.
When
A menu that takes the whole screen and opens from a button.
When not
A menu anchored to its button that doesn’t cover the screen: it opens on sheet, like a popover.
Where it starts
At the center of the button, at its radius (18 px).
Pieces and timing
The radius grows on flood to the farthest corner; its bounce lands off screen. Each link rises TRAVEL on rise just as the edge reaches its center (wellEdge). It closes on sheet back to the button, with no bounce, and the links leave together on ebb, 6 px upward.
If interrupted
It can be interrupted: the radius is a SpringValue. Close it while it opens, or the other way round, and it carries on from where it was, with its velocity.
Reduced motion
The whole panel fades in place in 200 ms and the links are already there.
Sound
open on opening and close on closing.
API
PATTERNS.well (open, close, origin, links, exit, lift) and wellEdge(distance, radius, origin?).
TypeScript
import { gsap } from 'gsap';
import { PATTERNS, SPRINGS, SpringValue, TRAVEL, tween, wellEdge } from '@flouvia/cauce';

const { open, close, origin, links, exit, lift } = PATTERNS.well;
const radius = new SpringValue(origin, (r) => {
  menu.style.clipPath = `circle(${r}px at ${x}px ${y}px)`;
}, SPRINGS[open]);

radius.to(full);
gsap.fromTo(items, { opacity: 0, y: TRAVEL }, {
  opacity: 1,
  y: 0,
  ...tween(links),
  stagger: (_, item) => wellEdge(distanceTo(item), full),
});

radius.to(0, SPRINGS[close]);
gsap.to(items, { opacity: 0, y: lift, ...tween(exit) });

surface

Brand headlines: each word comes up to the surface, one after another. It says the page’s name comes first.

Every word comes to the surface.

Each word rises 0.07 em and grows from 0.92 on bloom, one every 37.5 ms.
When
A page’s name or the tagline, in the brand typeface, once as the page loads.
When not
Body text, subheads and what enters on scroll, which enter on rise. Never two headlines at once.
Where it starts
Each word, 0.07 em below its place and at 0.92 of its size, grows from its baseline (origin 50 % 80 %).
Pieces and timing
Each word arrives on bloom, one every stagger('bloom'): 37.5 ms. One- and two-letter words travel with the next one and the last two go together, so none is left alone. The headline carries its whole text for screen readers.
If interrupted
It isn’t interrupted: it runs once and stays.
Reduced motion
The words fade in together, in place, in 200 ms.
Sound
None: what arrives on its own is silent.
API
PATTERNS.surface (piece, travel, scale, origin) and stagger.
TypeScript
import { gsap } from 'gsap';
import { PATTERNS, stagger, tween } from '@flouvia/cauce';

const { piece, travel, scale, origin } = PATTERNS.surface;
const size = parseFloat(getComputedStyle(headline).fontSize);

gsap.fromTo(words, { opacity: 0, y: travel * size, scale, transformOrigin: origin }, {
  opacity: 1,
  y: 0,
  scale: 1,
  ...tween(piece),
  stagger: stagger(piece, words.length),
});

soak

A sentence worth reading: a light runs through it letter by letter, ahead of the reader.

Some sentences deserve to be read slowly, letter by letter, as if someone were lighting them up.

Each letter goes from 0.24 to 1 at 62 letters per second. With the control, the light goes back and forth as it does with the scroll.
When
A single sentence per page, the one that sums up what follows. By time, as the page loads, or with the scroll, if it lives further down.
When not
Long paragraphs, buttons, labels or two sentences on the same screen.
Where it starts
At the first letter. The whole sentence starts dim, at 0.24.
Pieces and timing
Each letter goes from 0.24 to 1 on the ebb curve, at 62 letters per second; spaces don’t count. With the scroll, the front of light, about 21 letters wide, follows the scroll on drift. Screen readers read the whole sentence at once.
If interrupted
With the scroll it goes both ways: down it lights up, up it dims. By time it runs once.
Reduced motion
The sentence is already lit.
Sound
None.
API
PATTERNS.soak (piece, rate, dim) and follow.
TypeScript
import { gsap } from 'gsap';
import { PATTERNS, tween } from '@flouvia/cauce';

const { piece, rate, dim } = PATTERNS.soak;

gsap.set(letters, { opacity: dim });
gsap.to(letters, { opacity: 1, ...tween(piece), stagger: 1 / rate });

roll

The letter roller: as the pointer passes over a link, each letter rises and reveals its copy. It says this can be touched.

Point at a link or focus it: each letter rises one every 21.9 ms. If it’s already rolling, it doesn’t repeat.
When
Large text links, or links in a group: a menu, the footer.
When not
Without a pointer, since touch has no hover; on Cuenca buttons, which already give on drop; and on links inside a paragraph.
Where it starts
At the first letter, from left to right.
Pieces and timing
Each letter rises on drop, one every stagger('drop'): 21.9 ms up to 16 letters. When it ends it goes back to zero, where the copy and the letter are identical, so the jump can’t be seen.
If interrupted
If it’s already rolling, it doesn’t repeat, and it finishes even if the pointer leaves.
Reduced motion
It doesn’t roll: only the color changes, cross-faded.
Sound
The link’s hover, if it has one.
API
PATTERNS.roll (piece) and stagger.

crest

A case’s cover: its piece fills the screen and the sheet peeks from below with its name, to say there’s more. As the sheet rises, the cover sinks.

Scroll inside: the cover sinks to 0.94 and darkens to 60 %, following the scroll on drift.
When
A cover that is only an image or a video, with its content in a sheet below.
When not
A cover with text of its own, or a page with no piece to show.
Where it starts
At the bottom edge: the sheet peeks a quarter of the screen, a third on a phone.
Pieces and timing
The sheet peeks on sheet and what names the case enters during('sheet') on rise. With the scroll, the cover sinks to 0.94 and darkens to 60 %, following on drift. When the pointer passes over the peeking sheet, it lifts 10 px on drop.
If interrupted
It follows the scroll both ways: back at the top, the cover comes out of the shade.
Reduced motion
The sheet has already peeked and the cover neither sinks nor darkens.
Sound
None. Tapping the sheet plays tap.
API
PATTERNS.crest (piece, depth, dim, hover, hoverPiece) and follow.

wake

The separator that draws itself: in a list that enters on scroll, each row’s line is traced from the left along with its row. The list writes itself in order.

Each row rises one every 50 ms and its line draws from the left in 1386 ms.
When
Lists with separators: services, work, questions.
When not
Lone separators, cards or data tables: there the line is already in place.
Where it starts
At the left edge of each separator.
Pieces and timing
The row rises TRAVEL on rise and its line draws on a 1.2 s spring from the scale that starts already moving (spring('scene', 'flat', 8)), with its row’s delay.
If interrupted
It isn’t interrupted: it enters once. Reloading halfway down the page, whatever is already past appears with its line complete.
Reduced motion
The rows fade in together and their lines are already drawn.
Sound
None.
API
PATTERNS.wake (line, row) and stagger.

recede

The end of the page: the page lifts and the footer rises from the depth where it was waiting. It says this is where it ends.

At the end, the footer grows from 0.94 to 1 and its shade goes from 60 % to nothing, following the scroll on drift.
When
A footer behind a sheet that rises over a fixed cover.
When not
A page without a curtain, or a phone: there the footer’s content rises as it enters, following the scroll.
Where it starts
Under the page, fixed, from above its center (origin 50 % 35 %).
Pieces and timing
It grows from 0.94 to 1 and its shade goes from 60 % to nothing, following the scroll on drift over its height. Its content enters on rise, with the choreography’s step, once the footer shows 6 %.
If interrupted
It follows the scroll both ways.
Reduced motion
No depth and no shade: the footer is already there.
Sound
None.
API
PATTERNS.recede (depth, dim, reveal) and follow.

swell

The card that becomes the workspace: it grows from its place until it fills the screen, and its contents enter once it has arrived. It says you’re inside what you chose.

The scrim enters at 239 ms and the contents at 465 ms. Close it halfway: it turns around from where it is.
When
A card that opens a task: a form, an editor, a multi-step flow.
When not
Details that fit in a sheet or a modal: those go on sink or sheet.
Where it starts
In the card itself, at its radius (28 px). Its title travels from the card to the header.
Pieces and timing
The card grows on sheet; the scrim enters during('sheet'), at 239 ms, and the contents after('sheet'), at 465 ms, cascading on rise. On closing, everything at once: the contents leave together on ebb while the card and its title go back on sheet.
If interrupted
It turns around from where it is: closing it while it opens, or opening it while it closes, carries on from its pose. Back closes it too.
Reduced motion
The panel fades in place.
Sound
open on opening and close on closing.
API
PATTERNS.swell (piece, radius, exit), after and during.

sink

The sheet that comes in from its edge and leaves the way it came, by hand or with a button. It says where it came from and how it closes.

Pull it down by its edge: if it would land past halfway, it leaves with your speed; if not, it goes back.
When
Sheets, dialogs and panels that open over the page, especially on a phone.
When not
What covers the whole screen, which is swell or well, and what anchors to a button, which opens on sheet.
Where it starts
At its edge: the bottom, on a phone. On desktop, where it sits at the center, it rises 16 px and fades in.
Pieces and timing
It enters on sheet. It’s pulled down from its header; on release, if it would land past halfway it carries on with ebb and the hand’s velocity, and if not it goes back on sheet. The X, Escape and the backdrop let it leave the way it came.
If interrupted
It can be caught mid-air: dragging it halfway in holds it where it is. If it closes halfway in, it leaves from where it is.
Reduced motion
It comes and goes with a 200 ms fade; dragged, it doesn’t give or fly.
Sound
open on opening and close when asked to close.
API
PATTERNS.sink (open, close, back) and the gestures: drag, project, nearest and release.

W3C tokens

tokens.json is Cauce in the W3C design tokens format (DTCG 2025.10), for Style Dictionary, Figma or a native project: the scale, the bounces, the fade and the eight pieces. The format has no type for a spring, so each piece is a group with its duration and bounce (aliases of the scale), its velocity and how long it takes to settle; in $extensions it carries its CSS curve, its stiffness and its damping.

JSON
{
  "cauce": {
    "spring": {
      "drop": {
        "duration": { "$type": "duration", "$value": "{cauce.duration.base}" },
        "bounce": { "$type": "number", "$value": "{cauce.bounce.firm}" },
        "velocity": { "$type": "number", "$value": 0 },
        "settle": { "$type": "duration", "$value": { "value": 0.447, "unit": "s" } },
        "$extensions": {
          "com.flouvia.cauce": { "easing": "linear(0, 0.0128, …, 1)", "stiffness": 322.27, "damping": 28.72 }
        }
      }
    }
  }
}

SwiftUI takes the duration and the bounce as they are. Jetpack Compose takes the stiffness and the damping ratio, which is 1 minus the bounce.

SwiftUI
// SwiftUI
withAnimation(.spring(duration: 0.35, bounce: 0.2)) { pressed = true }

// Jetpack Compose
animateFloatAsState(target, spring(dampingRatio = 0.8f, stiffness = 322.27f))

Reference

NameSignature or valuesWhat it does
SPRINGS drop · bloom · sheet · rise · ebb · flood · surge · driftThe eight pieces, each { duration, bounce, velocity }.
DURATION brief 0.25 · base 0.35 · medium 0.5 · wide 0.6 · slow 0.8 · scene 1.2The scale, in seconds.
BOUNCE flat 0 · firm 0.2 · signature 0.3The three bounces.
FADE 0.2The reduced-motion fade, in seconds.
spring (duration, bounce?, velocity?)A spring from the scale by its names: spring('scene'), spring('wide', 'firm').
tween (piece | spring){ duration, ease } for GSAP: the duration is the settle time.
cssLinear (piece | spring, samples = 48)The curve as a CSS linear().
settle (piece | spring)Seconds until it’s within 0.2 % of its destination: the animation’s real duration.
reach (piece | spring, level)Seconds until progress reaches that level.
curve (piece | spring)Progress (0 to 1; with bounce, past 1) over the settle time.
displacement (spring)What’s left to arrive (1 to 0) at t seconds.
constants (spring){ stiffness, damping } for a unit mass.
SpringValue new SpringValue(value, onChange, spring)A number with physics that keeps its velocity when its destination changes.
follow (timeline, spring = drift)A ScrollTrigger’s onUpdate: the scene catches up with the scroll on a spring.
drag · release rubberband · rubberClamp · project · nearest · VelocityTracker · DECELERATIONGestures: what you drag comes with you and the spring starts with your speed (see “Gestures”).
impulse IMPULSE · impulseFrames · impulseCurve · impulseSettleWhat leaves its place and comes back to it (see “The impulse”).
stagger · after · during TRAVEL · STEPS · AFTER · DURINGChoreography: a cascade’s step, the waits and the distance (see “Choreography”).
PATTERNS tide · spill · well · surface · soak · roll · crest · wake · recede · swell · sinkThe numbers of the eleven patterns, each with its pieces.
tideDome (t, dome = 0.12)The height of tide’s dome at t seconds, as a fraction of the height: it follows the panel’s speed.
tideCover (dome = 0.12)Seconds until tide’s panel covers at its corners too: that’s when it navigates.
wellEdge (distance, radius, origin = 18)Seconds until well’s circle reaches that distance: that’s when each link rises.

Six principles

  • It starts where you touch it: the menu grows from its button and nothing appears out of nowhere.
  • It responds instantly and settles long: drop reaches 98 % in 0.21 s and the ending takes its time.
  • One bounce, like a drop: what arrives passes a little, once, and settles; it never trembles. What leaves and comes back, the impulse, dies down on its own and never repeats.
  • It leaves faster than it arrives: ebb lasts about half as long as what comes in.
  • It can be interrupted: what changes course midway keeps its velocity.
  • Without motion, it still makes sense: with reduced motion nothing travels or bounces.

Reduced motion

With prefers-reduced-motion nothing travels, grows or bounces: color and opacity changes fade in place in 200 ms (FADE, --duration-fade). Motion is never the only sign that something changed.

With motion: it rises and settles on sheet
Reduced motion: it fades in place in 200 ms

What grows on hover gets motion-reduce:scale-100! and what enters with a keyframe gets motion-reduce:animate-fade-in: it appears in place, without traveling.

HTML
<a class="transition-transform spring-drop hover:scale-104 motion-reduce:scale-100!">…</a>

<dialog class="sheet-in motion-reduce:animate-fade-in">…</dialog>

What a script opens fades instead of growing or traveling:

TypeScript
import { FADE, tween } from '@flouvia/cauce';

const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;

gsap.to(panel, reduce ? { opacity: 1, duration: FADE, ease: 'none' } : { opacity: 1, y: 0, ...tween('sheet') });

An impulse doesn’t move, a cascade fades in together and no pattern travels: what navigates navigates without animation and the rest fades in place. With your system set to reduced motion, every demo in this guide looks like this.

When to use each piece

WhenWhat to use
You touch it: hover it, press it, switch it on. drop
It arrives on its own: a headline, a notice, a context menu. bloom
It opens without covering the screen: a sheet, a modal, an accordion. sheet
It enters on scroll or as the page loads. rise
It leaves: closing, dismissing, removing. ebb
It covers the screen: the curtain between pages, a panel that floods. flood
It winds back before it goes, or changes shape. surge
It follows the scroll smoothly. drift
None of the above: a stroke being drawn, a number counting up. spring('scene')
It leaves its place and comes back: a bell, a heartbeat, a shake. impulse('medium', 'ripple')
You drag it: it goes with your hand and, when you let go, the spring starts with your speed. drag + release
A named moment: changing pages, opening the menu, a brand headline. PATTERNS

Never: blur on entrances, magnetic hover, scales above 1.06 or multi-layer choreography.

Figma is a trademark of its owner; its logo appears only to show compatibility and does not imply endorsement.