Back to Flet

Rive

website/docs/controls/rive/index.md

0.85.0.dev21.1 KB
Original Source

import TabItem from '@theme/TabItem'; import Tabs from '@theme/Tabs'; import {ClassAll, CodeExample} from '@site/src/components/crocodocs';

Rive

Render Rive animations in your Flet app with the flet-rive extension.

Platform Support

PlatformWindowsmacOSLinuxiOSAndroidWeb
Supported✅ (x64 only)

Usage

Add flet-rive to your project dependencies:

<Tabs groupId="uv--pip"> <TabItem value="uv" label="uv"> ```bash uv add flet-rive ``` </TabItem> <TabItem value="pip" label="pip"> ```bash pip install flet-rive # (1)! ```
  1. After this, you will have to manually add this package to your requirements.txt or pyproject.toml. </TabItem>
</Tabs> :::tip[Hosting Rive files] Host `.riv` files locally or load them from a CDN. Use `placeholder` to keep layouts responsive while animations load. :::

Example

<CodeExample path={frontMatter.examples + '/example_1/main.py'} language="python" />

Description

<ClassAll name={frontMatter.class_name} />