• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 4 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lottie Player component for Svelte

Svelte Lottie Player

npm (scoped) NPM David npm bundle size (scoped)

Lottie player component for use with Svelte.

This provides a Lottie player using the lottie-web library, adding a control toolbar, render graph and other handy configs for viewing Lottie animations.

Screenshot

Features

  • Configuration of lottie-web via props
  • Control toolbar with play, pause, stop, progress track with seeker, looping
  • Render graph for viewing frame render times

Table of Contents

Demos

Installation

With yarn:

yarn add @lottiefiles/svelte-lottie-player

With npm:

npm install --save @lottiefiles/svelte-lottie-player

Usage

Basic steps for use in a Svelte project:

<!-- App.svelte -->
<script>
  import { LottiePlayer } from '@lottiefiles/svelte-lottie-player';

  let controlsLayout = [
    'previousFrame',
    'playpause',
    'stop',
    'nextFrame',
    'progress',
    'frame',
    'loop',
    'spacer',
    'background',
    'snapshot',
    'zoom',
    'info',
  ];
</script>

<LottiePlayer
  src="https://assets2.lottiefiles.com/packages/lf20_wxUJzo.json"
  autoplay="{true}"
  loop="{true}"
  controls="{true}"
  renderer="svg"
  background="transparent"
  height="{600}"
  width="{600}"
  controlsLayout="{controlsLayout}"
/>

More Repositories

1

lottie-player

Lottie viewer/player as an easy to use web component! https://lottiefiles.com/web-player
TypeScript
1,539
star
2

lottie-react

lottie web player as a react component
TypeScript
718
star
3

lottie-interactivity

A small javascript library to enable interactivity with Lottie animations
HTML
428
star
4

awesome-lottie

A curated list of bookmarks, libraries, tools and resources related to Lottie and Bodymovin
306
star
5

jlottie

A small-footprint lottie player in Javascript
CSS
182
star
6

dotlottie-web

Official LottieFiles player for rendering Lottie and dotLottie animations in the web. Supports React, Vue, Svelte, SolidJS and Web Components.
TypeScript
155
star
7

dotlottie-rs

A universal, high-performance Lottie and dotLottie player built with Rust. Offers smooth rendering across platforms, low resource consumption, and extensive compatibility. Features FFI bindings for Kotlin, Swift, and WASM for seamless integration in Android, iOS, and Web projects.
Rust
147
star
8

lottie-js

An object model for representing and manipulating the Lottie JSON structure in JS.
TypeScript
143
star
9

glottie

OpenGL/WebGL based Lottie animation player
C++
117
star
10

lottie-vue

Lottie player wrapper for Vue.js
Vue
112
star
11

tgskit

Toolkit for dealing with Telegram Stickers and Bodymovin/Lottie animations.
TypeScript
62
star
12

relottie

Lottie processor powered by plugins
TypeScript
45
star
13

lottie-docs

Documentation for the lottie file format
Python
45
star
14

dotlottie-ios

.lottie player for iOS
C
41
star
15

dotlottie-android

Kotlin
37
star
16

svg-to-lottie-converter

SVG to Lottie API
Python
25
star
17

demo-audio-visualisation

Demonstration code for visualising audio with Lottie
C#
14
star
18

Course-for-Developers

In this quick course, you will learn the basics about implementing Lottie animations across your web and mobile apps.
10
star
19

lottie-theming

JavaScript
10
star
20

dotlottie-cs

C#
8
star
21

plugin-strapi

TypeScript
4
star
22

LottieNB

Simple insertion of Lottie player into Jupyter Notebooks
Jupyter Notebook
4
star
23

labs-epub3

Testing lottie support in an epub3 document
Shell
4
star
24

test-files

A collection of basic lotties to test lottie tooling
Python
3
star
25

lottie-styler

TypeScript
3
star
26

app-tutorial-lottieinteractions

A tutorial for Lottie Interactions
Swift
2
star
27

dotlottie-react-native

Kotlin
2
star
28

gltf-color

TypeScript
1
star