Icon
Description
The Icon component renders a visual glyph using either the strongly typed UIcons set or an Emoji. It is useful for reinforcing actions, labeling content, and improving scanability without writing raw HTML or CSS classes by hand.
Usage
Create icons through the Icon(...) helper overloads or by instantiating Icon directly. You can update the glyph later with SetIcon(...), style it with foreground color and text-formatting helpers, and add a tooltip with SetTitle(...).
Methods
SetIcon(UIcons icon, UIconsWeight weight = UIconsWeight.Regular, TextSize size = TextSize.Small)replaces the current icon using theUIconsset.SetIcon(Emoji icon, TextSize size = TextSize.Medium)replaces the current icon using an emoji.SetTitle(string title)sets the tooltip text and returns the icon.Render()returns the underlying icon element.Transform(UIcons icon, UIconsWeight weight)converts an icon and weight into the CSS class name used internally.
Properties
Foregroundgets or sets the icon color.Sizegets or sets the text size class.Weightgets or sets the text weight class.TextAligngets or sets the alignment class.Titlegets or sets the tooltip text.