Skip to content

DropdownOption

Examples#

See these.

DropdownOption #

Bases: Control

Represents an item in a dropdown. Either key or text must be specified, else an AssertionError will be raised.

content #

content: Control | None = None

A Control to display in this option. If not specified, text will be used as fallback, else text will be ignored.

key #

key: str | None = None

Option's key. If not specified text will be used as fallback.

leading_icon #

leading_icon: IconDataOrControl | None = None

An optional icon to display before the content or text.

style #

style: ButtonStyle | None = None

Customizes this menu item's appearance.

text #

text: str | None = None

Option's display text. If not specified key will be used as fallback.

trailing_icon #

trailing_icon: IconDataOrControl | None = None

An optional icon to display after the content or text.

before_update #

before_update()