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(int): optional Font size of the text
  • text_weight ft.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 animation
  • duration(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, default LinearGradient
  • on_click(ft.ControlEvent) optional Event handler when the text is clicked
  • on_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

flet_gradient_text-1.0.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.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

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

Hashes for flet_gradient_text-1.0.0.tar.gz
Algorithm Hash digest
SHA256 af477ce2a89d828fe4f90ba838a813566782cfb551d6cd79faaf14376bdbf67f
MD5 3d92b7a305e828f1a41d6eec26bd68ed
BLAKE2b-256 1a45a0e6ff0409c61d92af9f8a15e3018b5c697058bd8640251bd9f4071302e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flet_gradient_text-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 830fda83192f3e396ede3ac045485a43af37fde69a09e7ea4a19de4815a2f6cb
MD5 62083669198f75477931ed54fd94f6e2
BLAKE2b-256 bf6983eeb2857af49a15990b4774e10b14637a7c9b6e9c359fe5d0de0054d2ed

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