Skip to content

Icon

Overview

Icon displays a Material icon/symbol and is based on the Angular Material icon component.

Examples

import mesop as me


@me.page(
  security_policy=me.SecurityPolicy(
    allowed_iframe_parents=["https://google.github.io"]
  ),
  path="/icon",
)
def app():
  me.text("home icon")
  me.icon(icon="home")

API

icon

Creates a Icon component.

PARAMETER DESCRIPTION
key

The component key.

TYPE: str | None DEFAULT: None

icon

Name of the Material Symbols icon.

TYPE: str | None DEFAULT: None

style

Inline styles

TYPE: Style | None DEFAULT: None