# diffhtml-middleware-inline-transitions

> Monitors inline attributes and assigns transition hooks

Latest version **1.0.0-beta.29** (published 2022-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install diffhtml-middleware-inline-transitions
pnpm add diffhtml-middleware-inline-transitions
yarn add diffhtml-middleware-inline-transitions
bun add diffhtml-middleware-inline-transitions
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.29 |
| Published | 2022-10-30 |
| First published | 2017-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 116.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tim Branyen |
| Maintainers | tbranyen |
| Keywords | diffhtml, transitions |

## Links

- npm: https://www.npmjs.com/package/diffhtml-middleware-inline-transitions
- npm.io page: https://npm.io/package/diffhtml-middleware-inline-transitions

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0-beta.29 (latest) — 2022-10-30
- 1.0.0-beta.28 — 2022-04-29
- 1.0.0-beta.27 — 2022-04-01
- 1.0.0-beta.26 — 2022-03-31
- 1.0.0-beta.25 — 2022-03-31
- 1.0.0-beta.24 — 2022-03-31
- 1.0.0-beta.23 — 2022-01-19
- 1.0.0-beta.22 — 2021-12-19
- 1.0.0-beta.21 — 2021-12-06
- 1.0.0-beta.20 — 2021-05-07
- 1.0.0-beta.19 — 2021-05-03
- 1.0.0-beta.18 — 2020-08-11
- 1.0.0-beta.17 — 2020-05-14
- 1.0.0-beta.16 — 2020-05-08
- 1.0.0-beta.15 — 2020-04-23
- … 14 more at https://npm.io/package/diffhtml-middleware-inline-transitions/versions

## README

# <±/> diffHTML Inline Transitions Middleware

Stable Version: 1.0.0-beta.29

Tiny module to support binding/unbinding declarative diffHTML transition hooks.

##### Installation

``` sh
npm install diffhtml-middleware-inline-transitions
```

##### Use

``` js
import { use } from 'diffhtml';
import inlineTransitions from 'diffhtml-middleware-inline-transitions';

use(inlineTransitions());
```

##### Example

Apply to an element by passing the function to the associated state name:

``` js
import $ from 'jquery';
import { innerHTML, html, use } from 'diffhtml';
import inlineTransitions from 'diffhtml-middleware-inline-transitions';

// Enable the monitoring of attributes for changes.
use(inlineTransitions());

// Use jQuery to return a promise and fade in the body and paragraph.
function fadeIn(body, domNode) {
  return $(domNode).fadeOut(0).fadeIn(1000).promise();
}

innerHTML(document.body, html`<body onattached=${fadeIn}>
  <p>Watch me fade in slowly!</p>
</body>`);
```

Full events and args list:

| Event Name           | Args
| :------------------- | :----------------------------------------------------------
| `onattached`         | `(eventTarget, domNode)`
| `ondetached`         | `(eventTarget, domNode)`
| `onreplaced`         | `(eventTarget, oldNode, newNode)`
| `onattributechanged` | `(eventTarget, oldNode, attributeName, oldValue, newValue)`
| `ontextchanged`      | `(eventTarget, oldNode, oldValue, newValue)`

---
_Source: https://npm.io/package/diffhtml-middleware-inline-transitions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
