Skip to content
Skip to content
Skip to content

Library

Layout animations in 1.1 kB, using the FLIP technique and nothing else.

stars
890
downloads
12,600
license
MIT
Install
npm install tinyflip
Dark navy satin with one streak of gold light

README.mdMIT

tinyflip animates layout changes with the FLIP technique: measure, change the DOM, then animate the difference with a transform. It is 1.1 kB and does not know about any framework.

Usage

ts
import { flip } from "tinyflip"

const play = flip(list.children)   // first: measure
list.append(list.firstElementChild) // change the DOM any way you like
play({ duration: 320 })             // invert and play

Good to know

  • Only transform and opacity are animated, so nothing triggers layout while it runs
  • Elements that entered or left get a fade; pass enter and exit to change it
  • With reduced motion the change is instant

It works with any renderer because the two calls sit on either side of whatever updates your DOM.

Library

Layout animations in 1.1 kB, using the FLIP technique and nothing else.

stars
890
downloads
12,600
license
MIT
Install
npm install tinyflip
Dark navy satin with one streak of gold light

README.mdMIT

tinyflip animates layout changes with the FLIP technique: measure, change the DOM, then animate the difference with a transform. It is 1.1 kB and does not know about any framework.

Usage

ts
import { flip } from "tinyflip"

const play = flip(list.children)   // first: measure
list.append(list.firstElementChild) // change the DOM any way you like
play({ duration: 320 })             // invert and play

Good to know

  • Only transform and opacity are animated, so nothing triggers layout while it runs
  • Elements that entered or left get a fade; pass enter and exit to change it
  • With reduced motion the change is instant

It works with any renderer because the two calls sit on either side of whatever updates your DOM.

Library

Layout animations in 1.1 kB, using the FLIP technique and nothing else.

stars
890
downloads
12,600
license
MIT
Install
npm install tinyflip
Dark navy satin with one streak of gold light

README.mdMIT

tinyflip animates layout changes with the FLIP technique: measure, change the DOM, then animate the difference with a transform. It is 1.1 kB and does not know about any framework.

Usage

ts
import { flip } from "tinyflip"

const play = flip(list.children)   // first: measure
list.append(list.firstElementChild) // change the DOM any way you like
play({ duration: 320 })             // invert and play

Good to know

  • Only transform and opacity are animated, so nothing triggers layout while it runs
  • Elements that entered or left get a fade; pass enter and exit to change it
  • With reduced motion the change is instant

It works with any renderer because the two calls sit on either side of whatever updates your DOM.

Start a project

Three quick picks so the first reply is useful. You finish the message on the contact page.

What do you need?

Rough budget

brief.tsdraft, not sent

Brief so far: nothing picked yet

or write to hello@sorenhale.dev

Nothing is sent from this page. Your picks are kept in this browser tab and wait for you on the contact form.

Start a project

Three quick picks so the first reply is useful. You finish the message on the contact page.

What do you need?

Rough budget

brief.tsdraft, not sent

Brief so far: nothing picked yet

or write to hello@sorenhale.dev

Nothing is sent from this page. Your picks are kept in this browser tab and wait for you on the contact form.

Start a project

Three quick picks so the first reply is useful. You finish the message on the contact page.

What do you need?

Rough budget

brief.tsdraft, not sent

Brief so far: nothing picked yet

or write to hello@sorenhale.dev

Nothing is sent from this page. Your picks are kept in this browser tab and wait for you on the contact form.

Footer

Local time, Oslo

Footer

Local time, Oslo

Footer

Local time, Oslo

Create a free website with Framer, the website builder loved by startups, designers and agencies.