Skip to main content

CupertinoFilledButton

An iOS-style button with filled with background color.

Examples

Live example

Basic Example

import flet as ft

def main(page: ft.Page):
page.add(
ft.CupertinoFilledButton(
content=ft.Text("CupertinoFilled"),
opacity_on_click=0.3,
on_click=lambda e: print("CupertinoFilledButton clicked!"),
),
)

ft.app(target=main)

Properties

disabled_color

The background color of the button when it is disabled.

content

A Control representing custom button content.

icon

Icon shown in the button.

icon_color

Icon color.

min_size

The minimum size of the button. Defaults to 44.0.

opacity_on_click

Defines the opacity of the button when it is clicked. Defaults to 0.4. The button will have an opacity of 1.0 when it is not pressed.

padding

The amount of space to surround the content control inside the bounds of the button.

text

The text displayed on a button.

tooltip

The text displayed when hovering the mouse over the button.

url

The URL to open when the button is clicked. If registered, on_click event is fired after that.

url_target

Where to open URL in the web mode. See Container.url_target for possible values.

Events

on_click

Fires when a user clicks the button.