Skip to main content

Overview

The Group component is a layout container that groups components together. Unlike Row and Column, Group doesn’t add extra padding or gaps between components, making it useful for creating tight, compact layouts.

Basic usage

Parameters

bool
default:"True"
If False, group 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.

Behavior

Visual grouping

Group creates a subtle visual border around components without adding spacing:

Examples

Form sections

Create visually distinct form sections:

Compact input groups

Create tightly grouped inputs:

Radio button groups

Group related radio options:

Grouped controls

Group related control elements:

Comparison layout

Group before/after or comparison sections:

Settings panel

Organize settings into logical groups:

Mixed component groups

Combine different component types:

Methods

update

Update the group’s properties:

Notes

The Group component adds a subtle border and background to visually separate grouped components, but doesn’t add internal spacing like Row or Column do.
Use Group when you want to create visual separation between sections without the structural layout constraints of Row or Column.
Group is perfect for creating compact forms where you want components to be close together while still maintaining visual organization.