Module row

Source
Expand description

§Row Module

Provides the row component and related utilities for horizontal layout in Tessera UI.

This module defines a flexible and composable row layout component, allowing child components to be arranged horizontally with customizable alignment, sizing, and weighted space distribution. It is a fundamental building block for constructing responsive UI layouts, such as toolbars, navigation bars, forms, and any scenario requiring horizontal stacking of elements.

§Features

  • Horizontal arrangement of child components
  • Support for main/cross axis alignment and flexible sizing
  • Weighted children for proportional space allocation
  • Declarative macro row_ui! for ergonomic usage

§Typical Usage

Use the row component to build horizontal layouts, optionally combining with column for complex grid or responsive designs.

See the documentation and examples for details on arguments and usage patterns.


This module is part of the tessera-ui-basic-components crate.

§Example

use tessera_ui_basic_components::{row::{row_ui, RowArgs}, text::text};
row_ui!(RowArgs::default(),
    || text("A".to_string()),
    || text("B".to_string()),
);

Macros§

row_ui
A declarative macro to simplify the creation of a row component.

Structs§

RowArgs
Arguments for the row component.
RowArgsBuilder
Builder for RowArgs.
RowItem
Represents a child item within a row layout.

Enums§

RowArgsBuilderError
Error type for RowArgsBuilder

Traits§

AsRowItem
Trait to allow various types to be converted into a RowItem.

Functions§

row
A row component that arranges its children horizontally. A layout component that arranges its children horizontally.