<- Back to Ready Layouts

This ready layout combines a left sidebar with a main content area split into two resizable panes.

Use this structure for list-detail views, editor-preview pages, comparison workflows, and workspaces where the secondary pane must stay visible while the primary pane scrolls. The root owns the viewport height; each split pane contains its own ScrollArea so pane content scrolls independently.

Sidebar + Splitted Content preview

Structure

  • The root Column owns the viewport height.
  • The outer Row splits Sidebar and ContentArea.
  • The ContentArea contains a Splitter with two pane containers.
  • Splitter.sizes defines the initial pane ratio.
  • Sidebar, primary pane, and secondary pane each contain their own ScrollArea.

Example

Notes

  • Use 100vh on the root only.
  • Keep the outer shell and split panes at min-height: 0.
  • Put scroll areas inside each pane when both sides need independent scrolling.
  • Use sizes for the initial split and max_sizes only when a pane must have a hard maximum width.

Dynamic Splits

Splitter.children can be updated at runtime with collection effects. When adding or removing panes, update sizes in the same action so the renderer receives a size entry for each pane.

The action appends or removes a pane component from children and then sets the new sizes list:

return sdk.effects.respond(
    sdk.effects.ui_collection_append(
        splitter_id,
        "children",
        pane_component_dict,
        surface_id=surface_id,
    ),
    sdk.effects.ui_property_update(
        splitter_id,
        "sizes",
        [500, 300, 250],
        surface_id=surface_id,
    ),
)