Tab
Represents a Tab in the User Interface
class Tab
Constructor
# Only required parameters
tab = Tab(name="Custom Tab")
# All parameters
tab = Tab(
name="Custom Tab",
icon="users",
gap: 8,
title="My Custom Tab"
)name
Allowed: string
Must be unique across the whole UI, cannot be longer than 36 characters
icon
Allowed: string
Icon tab
Available icons: Icons
gap
See Gap
Default: 6
Spacing between CardContainer elements. In most cases you can omit this.
title
Allowed: string | None
Default: None
Displayed at the top of your custom tab, above the cards.
Methods
create_container(type, **kwargs)
Adds a CardContainer to the Tab.
render()
Initializes the Tab. Should be called last, after all UI elements, cards, and containers are defined.
toast(title, description, type)
Displays a toast notification inside the app. Parameters:
Title:
string| requiredDescription:
string| requiredType:
"INFO","ERROR","SUCCESS"| required
Example:
tab.toast(type="INFO", title="Hello, World!", description="Welcome from py!")Note: The toast will only display if the custom tab is open.
Icons

report

chart

two_way

inbox

star

search

variants

message

users

history

clean

magic

eraser

convert

cloud

calc

calendar

key

gift

trophy

book

sun

cart

pill

bookmark


bear

heart

music

umbrella

tube

palette

lock

fire

preferences

power

share

bell

trash

nitro
Last updated
Was this helpful?