Interactive pieces

One piece of UI with states and inputs, like a like button, a toggle or a loader, for apps.

An Interactive project is one piece of UI, not a video: a like button, a toggle, a loader, pull to refresh. Pick Interactive in New project or the project type switch above the , or start from one of the four on Home. It has one artboard; draw it with shapes and icons (R), or bring in a screen.

States: a state is a stretch of the timeline, shown on the States row. Entering a state plays its stretch and then holds on its last moment. Turn on Plays again and again for a loader that spins until something happens, or have a state follow a number input so the number picks the moment (pull to refresh). Make the motion with keyframes and motions as usual; pick a state to jump to its start, drag it to move it, and drag its right edge to change its length. One state is where the piece starts.

Inputs: what the app sets. On/off (liked), a number (progress, pull) or fire, a one-time signal (done). Their names are what developers type, so they keep to letters, digits and _. A number can also be set by dragging on the piece while you try it.

Transitions: a way from one state, or any state, to another. It starts when an input turns on or off, goes above or below a value, or fires; when the pointer moves onto or off a layer (or the whole piece), presses, lets go or taps; or when the state’s motion ends. Mix blends from where the piece is into the new state over that many seconds, with its own easing. Also sets changes an input on the way, so a tap can turn liked on. The first transition that matches wins, top to bottom.

Try it: press Prototype. Hover, press, tap and drag on the piece, and use the card beside it to flip switches, move sliders, fire inputs or jump to a state.

Ship it: Export offers two more file types for an Interactive piece, with Studio Pro or Studio Team (making and trying pieces is free). Interactive package saves a .zip for websites and web apps: the piece as a .kinetic.json file, the Kinetic runtime (about 13 KB zipped) for plain HTML, React or a <kinetic-piece> element, a page that shows it working, and a README with the state and input names. Developers set inputs with setInput() and fire(), and hear statechange events. dotLottie with states saves a .lottie file with the states and inputs as a state machine, for iPhone, Android and other apps with a dotLottie player. Before you export, the dialog lists what dotLottie can’t carry, such as blends between states (they cut) and dragging.

Hand-off page: the Hand-off button beside Export makes a link for the developers who build the piece in. Anyone with the link sees the piece working, with a control for each input and a button for each state, the state and input names and what changes the state, code to copy, the three files to download, and a place to comment. They don’t need an account. The page shows the piece as it was when you made it or last pressed Update the page; the dialog says when you have changed it since. Comments come back to the same dialog, where you tick them off as Fixed (the page shows that) or delete them. Turn off the link deletes the page and its comments. Hand-off pages come with Studio Pro and Studio Team.