Skip to main content

AppBar

The AppBar component is used to display a prominent bar at the top of the screen, often containing navigation elements.


import dash
from dash import html
import yipit_dash_mui_components as dmc

dash._dash_renderer._set_react_version('18.2.0')

app = dash.Dash(__name__)

app.layout = dmc.YipitMUIProvider(
children=[
dmc.AppBar(
id="appbar",
position="static",
showMenuIcon=True,
title="AppBar Title",
color="primary",
sx={'paddingLeft': 4, 'paddingRight': 4}
)
]
)

if __name__ == "__main__":
app.run_server(debug=True)

Props Table

Below are the main props available for the AppBar component:

PropTypeDefaultDescription
idstringnullUnique ID for Dash callbacks.
positionstring'static'Position of the AppBar.
colorstring'primary'Color of the AppBar.
elevationnumber4Elevation of the AppBar.
showMenuIconbooleanfalseIf true, the menu icon button is shown.
n_clicksnumber0Number of times the AppBar has been clicked.
actionslist of React.ReactNode[]List of actions to display in the AppBar.
sxdictCustom styles for the AppBar.

For the full list of props, refer to the official MUI documentation, as these components are based on MUI:

MUI AppBar Documentation