Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@invisionag/iris-react-animation

Package Overview
Dependencies
Maintainers
24
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.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-91.74%
Maintainers
24
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 * as 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 * as 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 * as animationData from './animation.json';

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

FAQs

Package last updated on 28 May 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc