Skip to content

v2.2 Small, and growing every day

Motion, out of thin air.

Our CSS library for entrances, scroll-linked motion, hover and cursor effects. Add a class and it moves, the same in every modern browser.

npm i https://github.com/thinair-studios/aero/archive/refs/tags/v2.2.0.tar.gz

MIT licensed. 5.9 KB of CSS and an optional 9.2 KB script, gzipped, with no dependencies. It gets a new effect whenever one of our projects needs one.

peak grow-up · curls fade-right · letters fade-up
fade upscale upgrowwipeliftfanfade right
shakepopspinpulsebouncefloatwave

Why we built it

Our site's page transitions broke in Firefox and Zen, the browsers that can't animate between pages yet. We wanted them to look the same everywhere, not only where the newest CSS runs.

We already had a small stylesheet of entrances from an older site. We grew it into one library both sites use, with a small script that fills in whatever a browser is missing.

Now every animation on thinairstudios.dev is Aero, and Aero gets a new effect whenever one of our projects needs something it can't do yet. That's how it got exits, dialogs and page transitions this week.

  1. BeforeOne stylesheetA handful of entrances and hovers, copied from site to site.
  2. 19 Nov 20262.0, open sourceSplit into modules, MIT licensed, tested in three browsers.
  3. 19 Nov 20262.1, pinned scrollSections that stay in place while their contents move.
  4. 20 Nov 20262.2, coming and goingExits, dialogs, page transitions, text, numbers and more.
  • A class is the APIAdd aero-fade-up and it moves. Every setting is a custom property with a sensible default.
  • The same in every browserNative CSS where the browser has it, a small script where it doesn't, and the motion matches.
  • Small on purposeNo dependencies, and every module can be loaded on its own.

Every effect

Grouped by module. Click a class to copy it, or a module to see it move.

Entrances

Things arriving as they come into view, one after another if you like.

Exits

Things leaving, and Aero.leave() to remove them once they've gone.

Dialogs and drawers

Dialogs, drawers and popovers that animate open and closed, in CSS.

Scroll

Animation tied to the scroll position, including sections that stay pinned.

Hover

Lifts, nudges and shifts on hover and keyboard focus, never stuck on touch.

Cards and accordions

Cards that flip over, and details that open and close smoothly.

Cursor

Tilt, light and parallax that follow the pointer.

Attention

Shake, pop, spin, pulse, ping, bounce and float.

Text and numbers

Words and letters entering one by one, a hover wave, and numbers that count up.

Pages and layout

Page transitions and layout changes, through the browser's View Transitions.

Timing

Duration and easing presets for everything above.

Every entrance in its place

Each variant on the kind of element it was made for. They play as they come into view, and every one can be replayed.

fan-left · fan-right · liftA stack of cards or screens
US truckingDriver pay that adds up

A payslip that disagreed with itself, and a tool that finds pay that never reached it.

fade-upHeadings and text
fade-downNotifications
grow-upBars and columns
  1. Does it work without signal?
  2. Yes, the route is saved on the phone.
  3. Perfect, ship it.
fade-right · fade-leftMessages from both sides
The Wick, the creature you play: hunched, viridian, two pale eyes under a hood of layered folds.
fade-inPictures
Discard this draft?

You can't undo this.

scale-upDialogs and popovers
Uploading 3 files
  • route-plan.pdf100%
  • proof-of-delivery.jpg64%
  • rate-sheet.xlsx28%
grow-rightProgress and timelines

Coming and going

Exits, and dialogs, drawers and popovers that animate open and closed. They're real: open them.

aero-dialogDialogs
aero-drawerDrawers
Source on GitHubChangelog
aero-popoverPopovers and menus
    aero-leave-rightToasts that leave
    Discard this draft?

    You can't undo this.

    This is aero-drawer

    The case studies on our homepage open in this same drawer. Esc, the backdrop or the button closes it.

    Motion that follows the scroll

    Add aero-scrub and an animation follows the scroll instead of the clock: scroll back and it rewinds. The bar along the top of this page is one, aero-scrub-root with grow-right.

    The phones below stay pinned while they fan out: aero-track on the section, aero-scrub-track on the phones.

    aero-scrub aero-drawOur peak, drawn line by line as it scrolls into view.
    <section class="aero-track">
      <div style="position: sticky; top: 0">
        <img class="aero-scrub aero-scrub-track
                    aero-fan-left"
          style="--aero-scrub-range:
                 contain 10% contain 80%">

    Arrive, hold, step back

    On a list, each row comes in, holds in the middle of the screen and steps back as the next one takes over. It's how the work list on our homepage reads.

    <li class="aero-scrub aero-pass"
      style="--aero-scrub-range: cover 0% cover 100%">
    1. Driver pay that adds up US trucking
    2. Dispatch and freight platform US trucking
    3. Driver app with live GPS tracking US trucking
    4. Driver safety scoring US trucking
    5. A model that reads blueprints Furniture manufacturing
    6. An in-house HR platform Human resources
    7. Battery storage telemetry Smart city
    8. A household app that works without signal Our own product

    Hover, focus and touch

    These are pieces of our homepage with the classes that move them. Tab through them too: keyboard focus moves them the same way, and on touch nothing stays stuck after a tap.

    li.aero-hover-group · picture: aero-hover-target aero-hover-rise · arrow: aero-hover-target aero-hover-nudge

    plate: aero-hover-shift · buttons: aero-hover-lift-sm, aero-hover-scale

    card: aero-flip with aero-front and aero-back · underlines: drawn on hover, a bar at the side, shown until hover

    Follows the pointer

    Wrap an area in aero-cursor and aero.js tracks the pointer over it. Tilt and a soft light react to it, and parallax layers move at their own depth. On touch screens they rest.

    The Wick, the creature you play: hunched, viridian, two pale eyes under a hood of layered folds.
    aero-tilt · aero-spotlight
    aero-parallax-sm · aero-parallax-lg

    Attention

    Small effects that draw the eye: once for an error or a change, or looping while something is going on.

    aero-shakeErrors
    Groceries3
    aero-popChanges
    Syncing your list
    aero-spinLoading
    aero-pulseWaiting
    Tracking live
    aero-pingLive
    aero-floatResting
    aero-shimmerContent on its way
    aero-bounceLook here
    • US trucking Driver pay that adds up
    • US trucking Dispatch and freight platform
    • US trucking Driver app with live GPS tracking
    • US trucking Driver safety scoring
    • Furniture manufacturing A model that reads blueprints
    • Human resources An in-house HR platform
    • Smart city Battery storage telemetry
    • Our own product A household app that works without signal
    aero-marqueeTickers and logo rows

    Text and numbers

    Split a heading into words or letters and each piece enters on its own. Numbers count up when they come into view, every time they do.

    Small, and growing every day.

    aero-split · aero-wipe-updata-aero-split="letters"
    of CSS, gzipped
    5.9 KB
    of script, gzipped
    9.2 KB
    classes and attributes
    86
    browsers they run in
    3

    Hover a title: its letters rise one after another. aero-split · aero-hover-wave · stats: aero-count aero-repeat

    Layout changes

    Change the order inside Aero.swap and every card moves to its new place.

    Aero.swap(() => …) · .aero-morph

    Between pages it's Aero too. You probably came in through a reveal: the page grew out of the link you clicked, and going back closes it there. ShelfSync and the case studies slide over the homepage like sheets. Back to the studio

    Tune it yourself

    Pick a variant, set its timing and watch the cards replay. The code underneath is exactly what you'd write.

    Presets
    Variant

    Your settings

    US truckingDriver pay that adds up
    US truckingDispatch and freight platform
    US truckingDriver app with live GPS tracking
    <ul class="aero-stagger">
      <li class="aero-enter aero-fade-up">…</li>
    </ul>

    Why not something else?

    There are great libraries already. Here's honestly where each one fits, and where Aero does.

    Animate.css
    Use it when you want a big set of ready-made keyframe effects with no setup at all.
    AOS
    Use it when all you need is elements animating in as they scroll into view.
    GSAP
    Use it for complex timelines, SVG work and scroll choreography. It does far more than Aero.
    Motion
    Use it in React apps that need springs, gestures and layout animation.
    Aero
    Use it when you want entrances, scroll, hover, cursor, dialogs and page transitions as plain CSS classes, the same in every browser, and you're fine with a young library.

    Good to know

    Your CSS always wins

    Everything sits in @layer aero, so your own styles override Aero without specificity tricks.

    Two prefixes

    Every class works as aero- or the shorter ae-. The runtime adds its state classes in both.

    Reduced motion, your call

    Motion plays by default. Add aero-reduce-motion to <html> and visitors who prefer reduced motion see everything still.

    Page transitions

    Pages slide over each other with aero-pages.js, back button included. Firefox gets the same direction with aero-arrive.

    details.aero-collapse

    Get Aero

    It isn't on npm yet, because it's still growing. Install it from GitHub, pinned to a release.

    1. Install
      npm i https://github.com/thinair-studios/aero/archive/refs/tags/v2.2.0.tar.gz
    2. Load the styles
      @import "aero-css";
    3. Add the script
      <script src="node_modules/aero-css/dist/aero.js" defer></script>
      Only needed for in-view entrances, the scroll fallback and cursor effects.

    What it weighs

    Measured gzipped from the package this page runs on. Load everything, or only the modules you use.

    aero.min.css
    5.9 KB
    aero.js
    9.2 KB
    aero-pages.js
    2.4 KB
    • entrances1.1 KB
    • exits0.5 KB
    • overlays0.5 KB
    • disclosure0.6 KB
    • attention1.0 KB
    • text0.6 KB
    • scroll0.5 KB
    • hover1.2 KB
    • cursor0.7 KB
    • pages1.0 KB
    • arrival0.3 KB
    • core0.7 KB
    • motion0.6 KB