A flet component for gradient & animated text
Project description
flet_gradient_text
It displays text with a colorful gradient and optional animation of the gradient.
installation:
pip install flet_gradient_text
🔧 Parameters
text(str): The text content to displaytext_size(int): optional Font size of the texttext_weightft.FontWeight, optional Font weight (e.g., ft.FontWeight.BOLD)text_style(ft.TextStyle): optional Custom text style (used alongside other text props)animate(bool): default False Enables animationduration(float or int): default 0.5, Controls the speed of the animation (in seconds per loop)gradient: optional Custom gradient to apply over the text, defaultLinearGradienton_click(ft.ControlEvent) optional Event handler when the text is clickedon_hover(ft.ControlEvent) optional Event handler when hovering over the text
🧩 Usage
import flet as ft
from flet_gradient_text import GradientText
def main(page: ft.Page):
page.add(
GradientText(
text="Hello Gradient!",
text_size=40,
text_weight=ft.FontWeight.BOLD,
animate=True,
duration=1,
)
)
ft.app(target=main)
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flet_gradient_text-1.0.0.tar.gz.
File metadata
- Download URL: flet_gradient_text-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af477ce2a89d828fe4f90ba838a813566782cfb551d6cd79faaf14376bdbf67f
|
|
| MD5 |
3d92b7a305e828f1a41d6eec26bd68ed
|
|
| BLAKE2b-256 |
1a45a0e6ff0409c61d92af9f8a15e3018b5c697058bd8640251bd9f4071302e7
|
File details
Details for the file flet_gradient_text-1.0.0-py3-none-any.whl.
File metadata
- Download URL: flet_gradient_text-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
830fda83192f3e396ede3ac045485a43af37fde69a09e7ea4a19de4815a2f6cb
|
|
| MD5 |
62083669198f75477931ed54fd94f6e2
|
|
| BLAKE2b-256 |
bf6983eeb2857af49a15990b4774e10b14637a7c9b6e9c359fe5d0de0054d2ed
|