Skip to main content

flet-timelines

A powerful Timeline control for Flet that allows you to create beautiful, customizable timelines in your Flet applications.

Features

  • Multiple timeline types (Basic and Style-Based)
  • Various content alignments (Basic, Reverse, Alternating)
  • Customizable indicators and connectors
  • Flexible styling options
  • Responsive design

Installation

Add dependency to pyproject.toml of your Flet app:

dependencies = [
    "flet-timelines",
    "flet>=0.27.6",
]

Basic Usage

Here's a simple example of how to create a basic timeline:

from flet_timelines import Timeline, TimelineType, ContentsAlign
import flet as ft

def main(page: ft.Page):
    # Create timeline items
    items = [
        ft.Container(
            content=ft.Card(
                content=ft.Container(
                    content=ft.Column([
                        ft.Text("Event 1", weight="bold"),
                        ft.Text("Description of event 1")
                    ]),
                    padding=10
                )
            ),
            width=200
        ),
        ft.Container(
            content=ft.Card(
                content=ft.Container(
                    content=ft.Column([
                        ft.Text("Event 2", weight="bold"),
                        ft.Text("Description of event 2")
                    ]),
                    padding=10
                )
            ),
            width=200
        )
    ]

    # Create timeline
    timeline = Timeline(
        items=items,
        timeline_type=TimelineType.BASIC,
        contents_align=ContentsAlign.BASIC,
        color=ft.colors.BLUE,
        indicator_size=20,
        expand=True
    )

    page.add(timeline)

ft.app(main)

Timeline Types

Basic Timeline

The basic timeline provides a simple, clean layout with customizable indicators and connectors.

Timeline(
    items=items,
    timeline_type=TimelineType.BASIC,
    contents_align=ContentsAlign.BASIC
)

Style-Based Timeline

The style-based timeline offers advanced styling options for indicators, connectors, and spacing.

Timeline(
    items=items,
    timeline_type=TimelineType.STYLE_BASED,
    contents_align=ContentsAlign.ALTERNATING,
    connector_style=ConnectorStyle.DASHED,
    indicator_style=IndicatorStyle.OUTLINED
)

Content Alignment

  • ContentsAlign.BASIC: Items aligned on one side
  • ContentsAlign.REVERSE: Items aligned on the opposite side
  • ContentsAlign.ALTERNATING: Items alternate between sides

API Reference

Timeline Properties

Basic Properties

  • items: List of Control objects to display in the timeline
  • timeline_type: Type of timeline (TimelineType.BASIC or TimelineType.STYLE_BASED)
  • contents_align: Alignment of timeline items (ContentsAlign.BASIC, REVERSE, or ALTERNATING)
  • color: Color of the timeline indicators and connectors
  • indicator_size: Size of the timeline indicators

Style-Based Properties

  • connector_style: Style of connectors (ConnectorStyle.SOLID, DASHED, or DECORATED)
  • connector_thickness: Thickness of connector lines
  • connector_space: Space between connector and content
  • connector_indent: Indentation of connectors
  • indicator_style: Style of indicators (IndicatorStyle.DOT, OUTLINED, CONTAINER, or TRANSPARENT)
  • indicator_position: Position of indicators
  • node_position: Position of nodes
  • node_align: Alignment of nodes (TimelineNodeAlign.START, END, or BASIC)
  • connection_direction: Direction of connections (ConnectionDirection.BEFORE or AFTER)
  • dash_size: Size of dashes in dashed connector style
  • gap_size: Size of gaps between dashes
  • gap_color: Color of gaps in dashed connector style

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flet_timelines-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

flet_timelines-0.1.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file flet_timelines-0.1.2.tar.gz.

File metadata

  • Download URL: flet_timelines-0.1.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for flet_timelines-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1371ee8e603db5303cfff0af5914cbe28646d4e20773310ab04d5abad0446ae3
MD5 b2ad09ddb3a5293fa79c6422b7ae6fdb
BLAKE2b-256 09b4d02324539128216d63db5298b832f33c4052fa9c46e47b16ff3b63b59658

See more details on using hashes here.

File details

Details for the file flet_timelines-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: flet_timelines-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for flet_timelines-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed9ad3dae792709770e37851db6eadc38541b4e416205e3c3e09cbf7f1b9dac8
MD5 51f4778a63cfbab57569ddf1f14226bd
BLAKE2b-256 5bfe3f6f17a32c4b3124625d1cc3dbdf739b5ec10daf28cba0c25e2921534213

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

Supported by

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