Skip to content

Reflex component for LottieFiles/dotLottie based on @lottiefiles/dotlottie-react component

License

Notifications You must be signed in to change notification settings

onexay/reflex-lottiefiles

Repository files navigation

LottieFiles

A Reflex custom component for LottieFiles/dotLottie based on @lottiefiles/dotlottie-react.

Installation

PIP

pip install reflex-lottiefiles

Poetry

poetry add reflex-lottiefiles

Usage

Props

Name Type Default Description
autoplay bool False Auto-starts the animation on load
loop bool False Determines if the animation should loop
src string URL to the animation data (.json or .lottie)
data string Source as string
marker string Named marker
speed int 1
mode forward reverse bounce reverse-bounce forward Animation play mode
background_color string Background color of the canvas. A 6-digit or 8-digit hex color string
play_on_hover bool False Determines if the animation should play on mouse hover and pause on mouse out

Sample

from reflex_lottiefiles import LottieFiles

def index():
    return LottieFiles(
        src="URL",
        autoplay=True,
        loop=True,
    )

See demo code for details.

About

Reflex component for LottieFiles/dotLottie based on @lottiefiles/dotlottie-react component

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages