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.

Metadata

Release files for flet-timelines 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flet-timelines 0.1.2
File Size Uploaded
flet_timelines-0.1.2.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flet-timelines 0.1.2
File Interpreter ABI Platform
flet_timelines-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 27.4 kB

Release files / flet_timelines-0.1.2.tar.gz

Download URL flet_timelines-0.1.2.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1371ee8e603db5303cfff0af5914cbe28646d4e20773310ab04d5abad0446ae3
BLAKE2b-256 checksum
How to use checksums
09b4d02324539128216d63db5298b832f33c4052fa9c46e47b16ff3b63b59658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.3

Release files / flet_timelines-0.1.2-py3-none-any.whl

Download URL flet_timelines-0.1.2-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed9ad3dae792709770e37851db6eadc38541b4e416205e3c3e09cbf7f1b9dac8
BLAKE2b-256 checksum
How to use checksums
5bfe3f6f17a32c4b3124625d1cc3dbdf739b5ec10daf28cba0c25e2921534213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page