The default layout for Solara apps. It consists of an toolbar bar, a sidebar and a main content area.
@solara.component def AppLayout( children=, sidebar_open=True, title=None, navigation=True, toolbar_dark=True, ): ...
- The title of the app is set using the Title component.
- The sidebar content is set using the Sidebar component.
- The content is set by the
Pagecomponent provided by the user.
This component is usually not used directly, but rather through via the Layout system.
The sidebar is only added when the AppLayout has more than one child.
with AppLayout(title="My App"): with v.Card(): ... # sidebar content with v.Card(): ... # main content
children: The children of the AppLayout. The first child is used as the sidebar content, the rest as the main content.
sidebar_open: Whether the sidebar is open or not.
title: The title of the app shown in the app bar, can also be set using the Title component.
toolbar_dark: Whether the toolbar should be dark or not.
navigation: Whether the navigation tabs based on routing should be shown.
This component does not render well as a child component. If you want to see it, you should follow the multipage guide above 🙂