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


def load(e: me.LoadEvent):
  me.set_theme_mode("system")


@me.page(
  on_load=load,
  security_policy=me.SecurityPolicy(
    allowed_iframe_parents=["https://google.github.io"]
  ),
  path="/icon",
)
def app():
  with me.box(style=me.Style(margin=me.Margin.all(15))):
    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