Metadata-Version: 2.1
Name: reflex-lottiefiles
Version: 0.0.1
Summary: Reflex custom component lottiefiles
Author-email: Akshay Ranjan <akshay.ranjan@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/onexay/reflex-lottiefiles
Keywords: reflex,reflex-custom-components
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: reflex >=0.4.2
Provides-Extra: dev
Requires-Dist: build ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'

# 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.
