Reflex custom component lottiefiles
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for reflex_lottiefiles-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b821747bf254b778d1763bc64cdb412fa39400f99574f3b7f93de99812dcd55c |
|
MD5 | eb76320ca7f62500d631c05f69791ecd |
|
BLAKE2b-256 | f5b42ee47120600c4decedd3e02c67d8ab2f4eb98fa74fdc151b84428024ab42 |