Skip to Content
Neshel-UI
Animations (experimental)

Animations

What the experimental animations package contains, its status, and how its documentation is organised.

Experimental and not on npm

@neshel-ui/animations is a private package (0.0.0). It cannot be installed, and its API may change before a first publication. These pages document what exists in the repository.

@neshel-ui/animations is a set of motion effects for React built on a framework-free engine. Its catalogue has 157 effects in 15 families. Every effect follows the same rules:

  • It restores what it touches. Effects write styles through one motion host per element, and the original inline values come back when they end.
  • Effects compose. Several effects can share one element; real conflicts are resolved and reported.
  • Reduced motion is live. Each effect has a defined behaviour under prefers-reduced-motion, also when the preference changes while it runs.
  • Content comes first. Server markup is the visible content; nothing stays hidden without JavaScript.

First example

plan-button.tsx
"use client";
import "@neshel-ui/animations/styles.css";
import { fadeUp, Reveal } from "@neshel-ui/animations/entrance";
import { Hover, lift } from "@neshel-ui/animations/hover";
import { Press, pressScale } from "@neshel-ui/animations/press";
import { Button } from "@neshel-ui/components";

export function PlanButton() {
  return (
    <Reveal preset={fadeUp} asChild>
      <Hover preset={lift} asChild>
        <Press preset={pressScale} asChild>
          <Button>Choose plan</Button>
        </Press>
      </Hover>
    </Reveal>
  );
}

Three families act on the same button: asChild applies each one to its child instead of adding an element.

Where things are

You want to…Read
Find an effect by name, id, API or familyCatalogue
See effects running, with code and optionsThe effects pages, one per family, in the sidebar
Combine effects on one elementComposition
Use or write effects without ReactMotion engine
Use the hooks and componentsReact bindings
Play, pause, reverse, seek, sequence or scrubControllers and timelines
Know what happens with reduced motion and the keyboardAccessibility
Keep pages fastPerformance
Render on the server, import styles, check browsersSSR, styles and support
Look up every exportThe reference pages, one per import path

Not included

  • Notifications. createToaster and Toaster are in Components; F06 only animates lists that another component owns.
  • Complete widgets. Use the Components Accordion, Collapsible and Switch; animations add motion, not semantics.
Edit on GitHub

On this page