sidebar(defaultopen = True) -> Dict

The sidebar function adds sidebar to your app.

Parameters

  • defaultopen (True): Whether to expand sidebar on desktop by default

Returns

  • Dict with sidebar component data

Usage Example

Here’s an example of how to add sidebar to your app:

from preswald import sidebar

sidebar(defaultopen=True)

Key Features

  1. Control: You can use sidebar only if needed which gives you the full control.
  2. Easy to use: No configuration needed—just call the function.

Why Use sidebar?

Sidebar provide a way to show sidebar on your preswald app explicitly as needed.