@fluxus-ui/core
v0.14.3
Published
Fluent Motion / Dynamic UI primitives: layout morphing, staggered entrances, physical press feedback. Zero dependencies.
Downloads
1,225
Maintainers
Readme
@fluxus-ui/core
The engine of Fluxus: motion primitives for the DOM in plain TypeScript, with no dependencies. Interfaces should feel alive: nothing pops in, nothing jumps. Everything transforms through springs and continuous paths.
npm install @fluxus-ui/coreimport { attachPress, createMorph, staggerIn, staggerOut } from '@fluxus-ui/core';
// A container stretches into its new content instead of swapping it.
const morph = createMorph(card, { spring: 'smooth' });
await morph.to(() => card.replaceChildren(next));
// Nothing pops in or out: children arrive and leave one after another.
staggerIn(list.children, { delayStep: 70 });
await staggerOut(list.children, { delayStep: 40 });
// What is pressed gives a little, and springs back.
attachPress(button, { spring: 'snappy' });It honours prefers-reduced-motion: with it on, changes are immediate.
@fluxus-ui/core/base is everything but the cell layout engine, and @fluxus-ui/core/cells is that engine alone, for whoever wants to load it apart.
For React, see @fluxus-ui/react; for components, @fluxus-ui/ui. Design and decisions: SPEC.md.
MIT
