1.3.2 • Published 4 years ago

lit-transition v1.3.2

Weekly downloads
27
License
MIT
Repository
github
Last release
4 years ago

lit-transition

A directive for animated transitions in lit-html.

Build Coverage Status semantic-release

Documentation

Full documentation is available at sijakret.github.io/lit-transition.

Docs source is in the docs folder.

To build the library and the docs yourself, clone it run npm install and npm run build. This will build the library as well as the documentation.

Overview

lit-transition is a directive for lit-html that will automatically generate animated tranistions when templates are swapped.

The library detects when your template re-renders and applies css transitions and animations. It mostly manages a state cycle when your view is updated by automatically appending and removing DOM nodes as they transition in and out.

import {html, render} from 'lit-html';
import {transition} from 'lit-transition';

// This is a lit-html template function. It returns a lit-html template.
const helloTemplate = (name) => html`<div>Hello ${name}!</div>`;

// This renders <div>Hello Steve!</div> to the document body
render(transition(helloTemplate('Steve')), document.body);

// This updates to <div>Hello Kevin!</div>, while looking cool
render(transition(helloTemplate('Kevin')), document.body);

Check out the documentation!

Installation

$ npm install lit-transition

Roadmap

  • multi-root templates
  • add js hooks
  • add transitions via web animation

Contributing

Happy to accept PRs!

1.3.2-next.1

4 years ago

1.3.2

4 years ago

1.3.1-next.1

4 years ago

1.3.1

4 years ago

1.3.0-next.1

4 years ago

1.3.0

4 years ago

1.2.0-next.4

4 years ago

1.2.0-next.3

4 years ago

1.2.0

4 years ago

1.0.0-next.1

4 years ago

1.2.0-next.2

4 years ago

1.2.0-next.1

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.0.1-alpha-5

4 years ago

0.0.1-alpha-3

4 years ago

0.0.1-alpha-4

4 years ago

0.0.1-alpha-1

4 years ago

0.0.1-alpha-2

4 years ago

0.0.1-alpha

4 years ago