Skip to main content

Icon

Function Icon 

Source
pub fn Icon(_: IconProps) -> Element
Expand description

An icon from upstream’s set, drawn in the current text colour.

Decorative by default: it sits beside text or inside a named control, so it is hidden from assistive technology rather than read twice. Give it a label only when it stands alone and carries meaning (a status with no text); it is then an image with that name. For an icon-only control, use IconButton, which puts the name on the button.

§Props

For details, see the props struct definition.

  • name : IconName
  • size : IconSize
  • label : Option<AccessibleName>

    Makes the icon a named image.

  • class : Option<String>