Skip to main content

row

Function row 

Source
pub fn row() -> RowBuilder
Expand description

§row

A layout component that arranges its children in a horizontal row.

§Usage

Stack components horizontally, with options for alignment and flexible spacing.

§Parameters

  • modifier — modifier chain applied to the row container.
  • main_axis_alignment — alignment along the horizontal axis.
  • cross_axis_alignment — alignment along the vertical axis.
  • children — child slot rendered inside the row.

§Examples

use tessera_components::{modifier::ModifierExt as _, row::row, spacer::spacer, text::text};
use tessera_ui::Modifier;

row().children(|| {
    text("First");
    spacer().modifier(Modifier::new().weight(1.0));
    text("Last");
});