Skip to content

Stack column

StackColumn groups several bound components into one cell, stacking them vertically — useful for showing a name and email together, or a title with a subtitle. Pass a schema of normal components to ->schema(), each bound to a row field with ->bound($rowKey).

StackColumn::make('identity')->label('User')->schema([
Text::bound('name')->color(Color::default()),
Text::bound('email')->size(Size::Sm),
]);
TextColumn::make('role');

The cell materializes the schema against each row — filling text from name and email per the bindings — then renders it through the normal component library, so any component’s display modifiers still apply (the example colors the name and sizes the email down). The stack’s own key labels the header; the bound components read their own row fields, not the stack’s key.

StackColumn::make('product')->label('Product')->schema([
Text::bound('title'),
Badge::bound('sku'),
]);

->bound($rowKey) is shorthand for ->make('')->dataKey($prop, $rowKey) against the component’s primary wire prop; use ->dataKey($prop, $rowKey) directly to bind any other prop, and opt custom components into the shorthand with the HasPrimaryBinding concern.