A lightweight motion toolkit
for expressive websites.

ZERO DEPENDENCIES

AMBER / FOOTPRINT LESS TO CARRY.

Small by design.

0.0 KB

Smooth Scroll + Animation · Minified + gzipped

~ 55% lighter.

Than using separate libraries for scrolling and animation.

Entire toolkit. Under 20 KB.

Scroll, animation, and every plugin. Minified + gzipped.

Add only what
you use.
BUILD YOUR BUNDLE ↓
Control
~0.0 KB
Animate
~0.0 KB
Morph
~0.0 KB
Total
~ 0.0 KB
ZERO DEPENDENCIES. NOTHING EXTRA, UNTIL YOU NEED IT.
AMBER / COLOPHON

The rest is yours.

Take Amber somewhere I haven’t imagined.

MADE WITH AMBER.
KEEP SCROLLING

A QUICK HELLO

What’s your name?

AMBER / QUICK REFERENCE

Getting Started

Install

Install the smooth-scroll engine:

npm install amber-scroll

Import

Import the core Amber class:

import Amber from 'amber-scroll';

Create your first instance / setup

Set up a viewport and panel structure in HTML:

<div class="viewport">
  <main data-amber>
    <section>Panel 01</section>
    <section>Panel 02</section>
  </main>
</div>
.viewport { height: 100svh; overflow: auto; }
main[data-amber] { display: flex; flex-direction: column; }
main[data-amber] > section { flex: none; min-height: 100svh; }

Initialize Amber once the DOM is ready:

const amber = new Amber();

One tiny example

Simplest scroll initialization with an update listener:

import Amber from 'amber-scroll';

const amber = new Amber();

amber.on('scroll', ({ progress }) => {
  console.log(`Scroll progress: ${(progress * 100).toFixed(0)}%`);
});

Core concepts

Next step