navius

Animation

Navius primitives are animation-library agnostic. Drive transitions off the discrete data-open / data-closed contract with CSS; no JS animation runtime required.

Animate from state

Every state is a discrete, boolean-presence attribute rather than a single data-state token: open/closed is data-open / data-closed, checked/unchecked is data-checked / data-unchecked, and a toggle's pressed state is data-pressed. Target the one you want with a CSS animation or transition.

Mount & unmount

By default, overlay popups are removed from the DOM when closed. On open, the popup mounts and its first committed frame carries data-starting-style, the "from" state your CSS transition interpolates away from. On close, the engine keeps the popup mounted, flips it to data-ending-style, and waits for the animation to finish before it unmounts. No KeepMounted is needed for exit animations to run.

Enter & exit

Style the resting (open) state normally, then declare the entering/leaving state under data-starting-style and data-ending-style. A plain CSS transition interpolates between them; because the transition is cancellable mid-flight, rapid open/close feels natural.

Animating size

CSS can't transition height to auto. For Accordion and Collapsible the engine measures the panel and publishes it as a CSS variable, so you can transition to that value and zero it at the starting/ending phases.