Skip to main content

docked_toolbar

Function docked_toolbar 

Source
pub fn docked_toolbar() -> DockedToolbarBuilder
Expand description

§docked_toolbar

Present frequent actions across a full-width surface at the edge of a page.

§Usage

Keep page-level editing actions available at the bottom of a workspace.

§Parameters

  • modifier — placement and optional size constraints.
  • color_style — standard surface or vibrant primary container colors.
  • container_color, content_color — optional color overrides.
  • content — action controls with 48dp touch targets, spaced between 4dp and 32dp.
  • accessibility_label — name announced for the toolbar group.

§Examples

use tessera_components::{text::text, toolbar::docked_toolbar};
use tessera_ui::{remember, tessera};

#[tessera]
fn editing_actions() {
    let saved = remember(|| false);
    docked_toolbar().content(move || {
        text(if saved.get() { "Saved" } else { "Editing" });
    });
}