pub fn row<F>(args: RowArgs, scope_config: F)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
args— configures the row’s dimensions and alignment; seeRowArgs.scope_config— a closure that receives aRowScopefor adding children.
§Examples
use tessera_ui_basic_components::{
row::{row, RowArgs},
text::{text, TextArgsBuilder},
spacer::{spacer, SpacerArgs},
};
row(RowArgs::default(), |scope| {
scope.child(|| text(TextArgsBuilder::default().text("First".to_string()).build().unwrap()));
scope.child_weighted(|| spacer(SpacerArgs::default()), 1.0); // Flexible space
scope.child(|| text(TextArgsBuilder::default().text("Last".to_string()).build().unwrap()));
});