Create a Shell with Action Bar Layout
page_actionbar.RdA convenience function that creates a common layout pattern: a shell with a navigation header, an action bar, and a side panel. This is ideal for map-based applications or tools with multiple layers/options.
Arguments
- ...
Main content area (typically a map or primary view)
- title
Application title shown in the navigation header
- header_actions
Optional actions for the header (e.g., user menu, settings). These will be placed in the
content-endslot of the navigation.- actions
A
calcite_action_bar()component to slot alongside the panel.- panel_content
A
calcite_panel()shown when an action is selected.- panel_position
Position of the panel:
"start"(left) or"end"(right).- panel_width
Width of the shell panel:
"s","m", or"l".Optional footer content
Examples
page_actionbar(
title = "Wildlife Areas",
actions = calcite_action_bar(
calcite_action(text = "Add", icon = "plus"),
calcite_action(text = "Layers", icon = "layers", active = TRUE)
),
panel_content = calcite_panel(
heading = "Layers",
"Layer controls here"
),
"Map content here"
)
#> <calcite-shell>
#> Map content here
#> <calcite-navigation slot="header">
#> <calcite-navigation-logo slot="logo" heading="Wildlife Areas"></calcite-navigation-logo>
#> </calcite-navigation>
#> <calcite-shell-panel width="m" slot="panel-start">
#> <calcite-panel heading="Layers">Layer controls here</calcite-panel>
#> <calcite-action-bar slot="action-bar">
#> <calcite-action text="Add" icon="plus"></calcite-action>
#> <calcite-action text="Layers" icon="layers" active="TRUE"></calcite-action>
#> </calcite-action-bar>
#> </calcite-shell-panel>
#> </calcite-shell>