Esc

Try “tilt”, “reveal”, “drag”, or “reduced motion”.

Examples

HTML and CSS, with JavaScript where noted. Each one also comes written fully in JavaScript.

  • New

    Depth, not decoration

    Each layer sits at its own height above the card.

    Move your pointer over the stageEdit
    Tilt card with depthTurns toward the pointer. Its contents float at different heights.
  • Bring your pointer close, then clickEdit
    Magnetic buttonLeans toward the pointer and squishes when pressed. The label moves less than the button.
  • Slide your pointer along the dockEdit
    DockIcons grow and rise under the pointer. A near reaction with --k-scale and --k-y.
  • Fast

    Nothing runs while nothing moves.

    Yours

    Your transforms stay untouched.

    Small

    About 14 KB, gzipped.

    Hover the cardsEdit
    Spotlight cardsA glow follows the pointer. Kinesis writes its position, a CSS gradient draws the light.
  • Somewhere quiet

    Move your pointer over the sceneEdit
    Parallax layersEach layer drifts by a different amount, which creates depth.
  • Move your pointer anywhere on the pageEdit
    Eyes that followPupils follow the pointer anywhere on the page, at most 22px from center.
  • Move your pointer around the headsEdit
    Heads that turnHeads turn to face the pointer in 3D. The eyes sit in front of the face.
  • Move your pointer across the gridEdit
    Arrows that pointEvery needle points at the pointer and turns the short way.
  • Move your pointer left and rightEdit
    Gear trainThree meshed gears turn with the pointer. Spin values follow the gear ratio, so the teeth stay interlocked.
  • Sweep your pointer through the dotsEdit
    Repel field96 dots move away from the pointer, grow, and turn blue. One CSS rule.
  • Press the buttons, or Tab to one and press EnterEdit
    Pressable buttonsThree press styles. The second animates its shadow with --k-progress.
  • Edit
    Reveal on scrollItems fade in and rise, one after another, as they enter the viewport.
  • Scroll the pageEdit
    Scroll-linked motionA reading-progress bar follows the page. The tile turns as it crosses the screen.
  • Scroll the pageEdit
    Along a pathScroll progress moves a dot along a CSS offset-path.
  • Pull me
    Throw me
    Drag the cardsEdit
    Drag, throw, snap backOne card springs home. The other can be thrown and stops inside its box.
  • Move inside the boxEdit
    Custom cursorA dot follows the pointer exactly and a ring follows it softly.
  • Motion, declared.

    Edit
    Text revealCharacters appear one after another. Screen readers still read the heading as written.
  • Press playEdit
    Audio-reactive speakerBass moves the cone and treble shakes the cabinet.
  • Move your pointer fast, then stopEdit
    Speed as a signalThe needle shows pointer speed, mapped to an angle and smoothed with a spring.