Socket
Socket
Sign inDemoInstall

@qonto/ember-lottie

Package Overview
Dependencies
5
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @qonto/ember-lottie

Render lottie after effects animations in Ember.js


Version published
Weekly downloads
21K
increased by26.92%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

1.1.3 (2024-04-23)

Bug Fixes

  • end test waiter when using [@animation](https://github.com/animation)Data arg (b23adf7)

Readme

Source

ember-lottie-illustration

ember-lottie

CI Latest NPM release

Render lottie after effects animations in Ember.js.

Compatibility

  • Ember.js v3.28 or above
  • Ember CLI v3.28 or above
  • Node.js v18 or above
  • TypeScript v5 or above

Installation

ember install @qonto/ember-lottie

Usage

<Lottie
  @name="empty state"
  @animationData={{this.animationData}}
  @path="/data.json"
  @loop={{false}}
  @autoplay={{false}}
  @speed={{500}}
  @containerId={{this.id}}
  @onDataReady={{this.args.onDataReady}}
  @fetchOptions={{this.fetchOptions}}
/>

API reference

Arguments

ArgumentTypeDescription
namestringanimation name for future reference
animationDataobjectan object with the exported animation data (mandatory at least one: animationData or path)
pathstringthe relative path to the animation object (mandatory at least one: animationData or path)
loopbooleanby default at true, the animation runs forever, at false, the animation is played only once
autoplaybooleanby default to true, it will play as soon as it's loaded
speednumber1 is normal speed
containerIdstringthe dom element id on which to render the animation (mandatory)
onDataReadyfunctiona function that triggers the Lottie when you want it
onErrorfunctiona function that can be used as a callback when fetching the lottie file throws
fetchOptionsobjectany additional params to pass to fetch function (eg: {credentials: "include"})

TypeScript usage

The Lottie component has proper Glint types, which allow you to get strict type checking in your templates when using TypeScript.

Unless you are using strict mode templates (via first class component templates), you need to import the addon's Glint template registry entries as described in the Using Addons documentation:

// e.g. types/glint.d.ts
import "@glint/environment-ember-loose";
import type LottieRegistry from "@qonto/ember-lottie/template-registry";

declare module "@glint/environment-ember-loose/registry" {
  export default interface Registry
    extends LottieRegistry /* other addon registries */ {
    // local entries
  }
}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

FAQs

Last updated on 23 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc