Skip to main content

CupertinoListTile

An iOS-style list tile.

The CupertinoListTile is a Cupertino equivalent of the Material ListTile.

ft.CupertinoListTile(
title="Notifications",
subtitle="Enabled",
width=400,
leading=ft.Icon(ft.Icons.NOTIFICATIONS_OUTLINED),
trailing=ft.Icon(ft.Icons.CHEVRON_RIGHT),
bgcolor=ft.Colors.SURFACE_CONTAINER_LOW,
)
CupertinoListTile
Basic CupertinoListTile

Inherits: LayoutControl

Properties

Events

  • on_click - Called when a user clicks/taps the list tile.

Examples

Live example

Notched and non-notched list tiles

import flet as ft


def main(page: ft.Page):
def handle_tile_click(_: ft.Event[ft.CupertinoListTile]):
print("Tile clicked")

page.add(
ft.SafeArea(
content=ft.Column(
controls=[
ft.CupertinoListTile(
additional_info=ft.Text("Wed Jan 24"),
bgcolor_activated=ft.Colors.AMBER_ACCENT,
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
title=ft.Text("CupertinoListTile: notched = False"),
subtitle=ft.Text("Subtitle"),
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
on_click=handle_tile_click,
),
ft.CupertinoListTile(
notched=True,
additional_info=ft.Text("Thu Jan 25"),
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
title=ft.Text("CupertinoListTile: notched = True"),
subtitle=ft.Text("Subtitle"),
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
on_click=handle_tile_click,
),
],
),
)
)


if __name__ == "__main__":
ft.run(main)
notched

Properties

additional_infoclass-attributeinstance-attribute

additional_info: Optional[StrOrControl] = None

A Control to display on the right of the list tile, before trailing.

Similar to subtitle, an additional_info is used to display additional information.

Typically a Text control.

bgcolorclass-attributeinstance-attribute

bgcolor: Optional[ColorValue] = None

The background color of this list tile.

bgcolor_activatedclass-attributeinstance-attribute

bgcolor_activated: Optional[ColorValue] = None

The background color of this list tile after it was tapped.

leadingclass-attributeinstance-attribute

leading: Optional[IconDataOrControl] = None

A control to display before the title.

leading_sizeclass-attributeinstance-attribute

leading_size: Optional[Number] = None

Used to constrain the width and height of leading control.

Defaults to 30.0, if notched is True, else 28.0.

leading_to_titleclass-attributeinstance-attribute

leading_to_title: Optional[Number] = None

The horizontal space between leading and title.

Defaults to 12.0, if notched is True, else 16.0.

notchedclass-attributeinstance-attribute

notched: bool = False

Whether this list tile should be created in an "Inset Grouped" form, known from either iOS Notes or Reminders app.

paddingclass-attributeinstance-attribute

padding: Optional[PaddingValue] = None

The tile's internal padding. Insets a CupertinoListTile's contents: its leading, title, subtitle, additional_info and trailing controls.

subtitleclass-attributeinstance-attribute

subtitle: Optional[StrOrControl] = None

Additional content displayed below the title.

Typically a Text control.

titleinstance-attribute

title: Annotated[StrOrControl, V.str_or_visible_control()]

The primary content of this list tile.

Typically a Text control.

Raises:

  • ValueError - If it is neither a string nor a visible Control.

toggle_inputsclass-attributeinstance-attribute

toggle_inputs: bool = False

Whether clicking on this tile should toggle the state of (visible) toggleable controls like Radio, Checkbox or Switch inside it.

trailingclass-attributeinstance-attribute

trailing: Optional[IconDataOrControl] = None

A control to display after the title.

Typically an Icon control.

urlclass-attributeinstance-attribute

url: Optional[Union[str, Url]] = None

The URL to open when this button is clicked.

Additionally, if on_click event callback is provided, it is fired after that.

Events

on_clickclass-attributeinstance-attribute

on_click: Optional[ControlEventHandler[CupertinoListTile]] = None

Called when a user clicks/taps the list tile.