label: str | gradio.i18n.I18nData | None
label: str | gradio.i18n.I18nData | None
= None
name of the top bar. Not displayed to the user.
open: bool
open: bool
= True
if True, top bar is open by default.
visible: bool
visible: bool
= True
If False, the component will be hidden.
elem_id: str | None
elem_id: str | None
= None
An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: list[str] | str | None
elem_classes: list[str] | str | None
= None
An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.
render: bool
render: bool
= True
If False, this layout will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
height: int | str
height: int | str
= 320
The height of the top bar, specified in pixels if a number is passed, or in CSS units if a string is passed.
width: int | str
width: int | str
= "100%"
The width of the top bar, specified in pixels if a number is passed, or in CSS units (like "80%") if a string is passed. The bar will be horizontally centered.
bring_to_front: bool
bring_to_front: bool
= False
If True, the TopBar will be rendered on top of all other elements with a higher z-index. Defaults to False.
rounded_borders: bool
rounded_borders: bool
= False
If True, applies rounded borders to the bottom edges of the TopBar panel.
key: int | str | tuple[int | str, Ellipsis] | None
key: int | str | tuple[int | str, Ellipsis] | None
= None
in a gr.render, Components with the same key across re-renders are treated as the same component, not a new component. Properties set in 'preserved_by_key' are not reset across a re-render.
preserved_by_key: list[str] | str | None
preserved_by_key: list[str] | str | None
= None
A list of parameters from this component's constructor. Inside a gr.render() function, if a component is re-rendered with the same key, these (and only these) parameters will be preserved in the UI (if they have been changed by the user or an event listener) instead of re-rendered based on the values provided during constructor.
expand
expand
This listener is triggered when the TopBar is expanded.
collapse
collapse
This listener is triggered when the TopBar is collapsed.