# LottieFiles
A Reflex custom component for [LottieFiles](https://lottiefiles.com/)/[dotLottie](https://dotlottie.io/) based on [@lottiefiles/dotlottie-react](https://www.npmjs.com/package/@lottiefiles/dotlottie-react).
## Installation
### PIP
```bash
pip install reflex-lottiefiles
```
### Poetry
```bash
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` | | Animation play speed |
| `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
```python
from reflex_lottiefiles import LottieFiles
def index():
return LottieFiles(
src="URL",
autoplay=True,
loop=True,
)
```
See [demo code](https://github.com/onexay/reflex-lottiefiles/blob/main/lottiefiles_demo/lottiefiles_demo/lottiefiles_demo.py) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "reflex-lottiefiles",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "reflex, reflex-custom-components",
"author": null,
"author_email": "Akshay Ranjan <akshay.ranjan@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/aa/e4/0e1b978acbb5124522c39f18dec7924e024783500f0911131abf49bc7414/reflex_lottiefiles-0.0.2.tar.gz",
"platform": null,
"description": "# LottieFiles\n\nA Reflex custom component for [LottieFiles](https://lottiefiles.com/)/[dotLottie](https://dotlottie.io/) based on [@lottiefiles/dotlottie-react](https://www.npmjs.com/package/@lottiefiles/dotlottie-react).\n\n## Installation\n\n### PIP\n\n```bash\npip install reflex-lottiefiles\n```\n\n### Poetry\n\n```bash\npoetry add reflex-lottiefiles\n```\n\n## Usage\n\n### Props\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| `autoplay` | `bool` | `False` | Auto-starts the animation on load |\n| `loop` | `bool` | `False` | Determines if the animation should loop |\n| `src` | `string` | | URL to the animation data (.json or .lottie) |\n| `data` | `string` | | Source as string |\n| `marker` | `string` | | Named marker |\n| `speed` | `int` | `1` | | Animation play speed |\n| `mode` | `forward` `reverse` `bounce` `reverse-bounce` | `forward` | Animation play mode |\n| `background_color` | `string` | | Background color of the canvas. A 6-digit or 8-digit hex color string |\n| `play_on_hover` | `bool` | `False` | Determines if the animation should play on mouse hover and pause on mouse out |\n\n### Sample\n\n```python\nfrom reflex_lottiefiles import LottieFiles\n\ndef index():\n return LottieFiles(\n src=\"URL\",\n autoplay=True,\n loop=True,\n )\n```\n\nSee [demo code](https://github.com/onexay/reflex-lottiefiles/blob/main/lottiefiles_demo/lottiefiles_demo/lottiefiles_demo.py) for details.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Reflex custom component for LottieFiles/dotLottie",
"version": "0.0.2",
"project_urls": {
"homepage": "https://github.com/onexay/reflex-lottiefiles",
"source": "https://github.com/onexay/reflex-lottiefiles"
},
"split_keywords": [
"reflex",
" reflex-custom-components"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9743e1ee901d5982488fb6aaa88009ced583c5b6721ef674c87b56fa4e37f350",
"md5": "acb0d678da11167365f02ea877ed53a4",
"sha256": "a286ccd573850bc86ffcafc4dde40e07c2fb14db6c006af33cf5cdc9873dc9d6"
},
"downloads": -1,
"filename": "reflex_lottiefiles-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "acb0d678da11167365f02ea877ed53a4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7238,
"upload_time": "2024-07-26T19:04:12",
"upload_time_iso_8601": "2024-07-26T19:04:12.386962Z",
"url": "https://files.pythonhosted.org/packages/97/43/e1ee901d5982488fb6aaa88009ced583c5b6721ef674c87b56fa4e37f350/reflex_lottiefiles-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "aae40e1b978acbb5124522c39f18dec7924e024783500f0911131abf49bc7414",
"md5": "96601e7b4686fb1c0138cd6b5812c95f",
"sha256": "ae283395a0e8958155db29502d7d4323249aab8e83166e6ae7a3806eedc211ca"
},
"downloads": -1,
"filename": "reflex_lottiefiles-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "96601e7b4686fb1c0138cd6b5812c95f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6687,
"upload_time": "2024-07-26T19:04:13",
"upload_time_iso_8601": "2024-07-26T19:04:13.662747Z",
"url": "https://files.pythonhosted.org/packages/aa/e4/0e1b978acbb5124522c39f18dec7924e024783500f0911131abf49bc7414/reflex_lottiefiles-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 19:04:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "onexay",
"github_project": "reflex-lottiefiles",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "reflex-lottiefiles"
}