Skip to main content

TopAppBar

Function TopAppBar 

Source
pub fn TopAppBar(_: TopAppBarProps) -> Element
Expand description

The bar across the top of a screen. Its children are its content, left to right. How the bar is sized, spaced and separated from what is below it is the design system’s rule.

§Props

For details, see the props struct definition.

  • weight : Option<f32>
  • width : Option<f32>
  • height : Option<f32>
  • padding : Option<f32>
  • padding_role : Option<SpaceRole>
  • background : Option<Paint>
  • shape_role : Option<ShapeRole>
  • corner_radius : Option<f32>
  • border_width : Option<f32>
  • border_color : Option<Paint>
  • elevation : Option<f32>
  • fill_max_width : bool
  • fill_max_height : bool
  • title : String

    The window’s title, where this bar is the window’s own caption.

    A property rather than a child, because the Renderer has to be able to find it. Three design systems centre the window title and put everything else at the leading edge, and a bar whose children are an arbitrary tree gives the Renderer no way to tell which of them is the title. Where the bar is not the caption, or the design system puts its title at the start, this draws in the same place a first child would.

  • children : Element