Skip to main content
Layout widgets provide flexible ways to arrange other widgets in your notebook interface. They help you create complex, responsive layouts by combining multiple widgets together.

Supported Layout Widget Types

Below is a comprehensive list of supported layout widget types.
The Row layout widget arranges widgets horizontally in a single row.

Widget Parameters

key: string optional unique identifier for the widgetitems: list[BaseWidget] list of widgets to arrange horizontally
The Column layout widget arranges widgets vertically in a single column.

Widget Parameters

key: string optional unique identifier for the widgetitems: list[BaseWidget] list of widgets to arrange vertically
The Grid layout widget allows you to create a grid-based layout where widgets can span multiple rows and columns.

Widget Parameters

key: string optional unique identifier for the widgetcolumns: int number of columns in the gridrows: int optional number of rows in the grid. If not specified, rows will be created as needed.

Grid Item Parameters

When adding items to a grid using the add() method:item: BaseWidget the widget to add to the gridcol_span: int number of columns the item should span (default: 1)row_span: int number of rows the item should span (default: 1)

Layout Widget Nesting

Layout widgets can be nested to create complex arrangements. For example, you can place a row of widgets inside a grid cell, or create a column of rows.

Layout Widget Reactivity

Layout widgets are reactive to changes in their child widgets. When a child widget is updated, the layout will automatically adjust to accommodate the changes while maintaining the specified arrangement.