Skip to main content

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 display
  • text_size(optional): default text_size=20, Font size of the text
  • text_weight: optional, Font weight (e.g., ft.FontWeight.BOLD)
  • text_style(optional): property of type ft.TextStyle
  • animate (bool): default animate=False, True to Enable animation
  • duration(float or int): default duration=0.5, Controls the speed of the animation
  • gradient: (optional) Custom gradient to apply over the text, default LinearGradient
  • on_click(optional): Event handler when the text is clicked
  • on_hover(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

flet_gradient_text-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flet_gradient_text-1.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file flet_gradient_text-1.1.0.tar.gz.

File metadata

  • Download URL: flet_gradient_text-1.1.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

Hashes for flet_gradient_text-1.1.0.tar.gz
Algorithm Hash digest
SHA256 da05ba0f4f1884c581101de37b9062b460e00c2b1947e2fd3ce3e7a775c573e5
MD5 2ef01f8983c4dbe7a905f76eb7b82843
BLAKE2b-256 ac13c98ba757f95f94832a240f6f6c37b3f18c0717e11f7f7d362c3bf4978fa0

See more details on using hashes here.

File details

Details for the file flet_gradient_text-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flet_gradient_text-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81dc5c4a06347d443f6bd4b386aad1f2dc643558dc575a2d8fa86b5fb54684dc
MD5 16d983e2f75ba95b51153da3a7b3a1da
BLAKE2b-256 15ea75f32bcdbd1e0dfe9c38a6e133c7e9103a7a621fc6b1c85436871a0f2f0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page