Skip to main content

Overview

The Row component is a layout container that arranges child components horizontally. Use it to create side-by-side layouts and control how components are distributed across the width of your interface.

Basic usage

Parameters

Literal['default', 'panel', 'compact']
default:"'default'"
Row type. ‘default’ adds no additional styling. ‘panel’ adds a border and padding. ‘compact’ removes the gap between components.
bool
default:"True"
If False, row will be hidden.
str | None
default:"None"
An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
list[str] | str | None
default:"None"
An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
bool
default:"True"
If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
bool
default:"True"
If True, all child components will have equal height. If False, components will have their natural height.

Behavior

Component scaling

Components within a Row can have different scales to control their relative widths:

Equal height

By default, all components in a Row have equal height. You can disable this:

Examples

Panel variant

Create a visually distinct row with a border:

Compact layout

Remove spacing between components:

Nested layouts

Combine Rows with Columns for complex layouts:

Mobile responsiveness

On mobile devices, Rows automatically stack components vertically:

Methods

update

Update the row’s properties:

Notes

The equal_height parameter is True by default, which means all components will stretch to match the tallest component in the row.
Use the scale parameter on individual components to control their relative widths within a Row. A component with scale=2 will be twice as wide as one with scale=1.