Socket
Book a DemoInstallSign in
Socket

@invisionag/iris-react-animation

Package Overview
Dependencies
Maintainers
25
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invisionag/iris-react-animation

All additional props will be passed to it's container, which is `react-image-container` by default.

1.0.21
Source
npmnpm
Version published
Weekly downloads
121
317.24%
Maintainers
25
Weekly downloads
 
Created
Source
import Animation from '@invisionag/iris-react-animation';

A component that parses standardized Adobe After Effects animation data.

Usage:

All additional props will be passed to it's container, which is react-image-container by default.

Default

Takes a javascript object representing an Adobe After Effects animation (E.g. from a JSON file).

import Animation from '@invisionag/iris-react-animation';
import animationData from './animation.json';

<Animation data={animationData} />

Custom container

Use the children render prop to render the svg in a custom container.

Render prop params:

  • onRef: callback that will be invoked when the ref is set. Expects a domNode as first element, which will then be used as the node the animation is rendered in.
  • animation: the lottie animation instance. See https://github.com/airbnb/lottie-web#usage.
  • all additional props passed to Animation
import Animation from '@invisionag/iris-react-animation';
import animationData from './animation.json';

<Animation data={animationData}>
  {({ onRef }) => (
    <div ref={onRef} />
  )}
</Animation>

lottieOptions (optional)

This lets you pass options directly to lottie. Should be used as an escape hatch if all else fails.

import Animation from '@invisionag/iris-react-animation';
import animationData from './animation.json';

<Animation data={animationData} lottieOptions={{ loop: false }} />

FAQs

Package last updated on 22 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.