# @primeuix/motion

> Motion utilities for PrimeUI Libraries

Latest version **1.0.0** (published 2026-07-15) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install @primeuix/motion
pnpm add @primeuix/motion
yarn add @primeuix/motion
bun add @primeuix/motion
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2026-07-15 |
| First published | 2025-06-02 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.11.0 |
| Dependencies | 1 |
| Unpacked size | 21.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | PrimeTek Informatics |
| Maintainers | mert.sincan, cagatay.civici |
| Keywords | motion, animation, transition, composition utilities, primeng, primereact, primevue, primeuix |

## Links

- npm: https://www.npmjs.com/package/@primeuix/motion
- Issues: https://support.primeui.dev
- npm.io page: https://npm.io/package/@primeuix/motion

## Dependencies (1)

- [@primeuix/utils](https://npm.io/package/@primeuix/utils.md) ^0.8.0

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2026-07-15
- 1.0.0-rc.3 — 2026-07-15
- 1.0.0-rc.2 — 2026-07-02
- 1.0.0-rc.1 — 2026-06-28
- 1.0.0-beta.1 — 2026-06-25
- 0.1.1 — 2026-02-25
- 0.1.0 — 2026-02-25
- 0.0.11 — 2026-01-19
- 0.0.10 — 2025-11-24
- 0.0.9 — 2025-11-24
- 0.0.8 — 2025-11-23
- 0.0.7 — 2025-11-18
- 0.0.6 — 2025-11-10
- 0.0.5 — 2025-11-10
- 0.0.4 — 2025-07-13
- … 3 more at https://npm.io/package/@primeuix/motion/versions

## README

# PrimeUIX Motion

Framework-agnostic motion engine for CSS transitions and animations. Drives enter/leave phase logic, manages lifecycle hooks, tracks element dimensions for height/width expand-collapse effects, and respects `prefers-reduced-motion`.

```ts
import { createMotion } from '@primeuix/motion';

const motion = createMotion(el, {
    name: 'p-overlay',
    autoHeight: true,
    onBeforeEnter: (el) => { ... },
    onAfterLeave: (el) => { ... }
});

motion.enter();
motion.leave();
```

Phases are driven through `data-enter-phase` / `data-leave-phase` attributes on the target element, which CSS classes hook into. Height and width transitions read dimensions via `scrollHeight` / `scrollWidth` and expose them as CSS custom properties. When `safe` is set, motion is skipped entirely if the user has requested reduced motion.

## License

Licensed under the [PrimeUI License](https://primeui.dev/licenses) - Copyright (c) [PrimeTek Informatics](https://www.primetek.com.tr)

---
_Source: https://npm.io/package/@primeuix/motion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
