# RadzenIcon Class

An icon component that displays icons from the Material Symbols font (2,500+ icons included). RadzenIcon provides a simple way to add scalable vector icons to your Blazor application without external dependencies. Uses the embedded Material Symbols Outlined variable font to render icons as text glyphs, providing benefits including no HTTP requests for icon files (icons are part of the font), vector-based icons that scale perfectly at any size, text color inheritance with coloring via IconColor or CSS, access to 2,500+ Material Symbols icons, and support for Outlined (default), Filled, Rounded, and Sharp variants via IconStyle. Icon names use underscores (e.g., "home", "account_circle", "check_circle"). See Material Symbols documentation for the full icon list.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md)
- RadzenIcon

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender

## Syntax

```csharp
public class RadzenIcon : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender
```

## Examples

Basic icon:

```razor
<RadzenIcon Icon="home" />
```

Colored icon with custom style:

```razor
<RadzenIcon Icon="favorite" IconColor="#FF0000" IconStyle="IconStyle.Filled" Style="font-size: 2rem;" />
```

Icons in buttons:

```razor
<RadzenButton Icon="save" Text="Save" />
<RadzenButton Icon="delete" ButtonStyle="ButtonStyle.Danger" />
```

## Constructors

| Constructor | Description |
|-------------|-------------|
| `public RadzenIcon()` | An icon component that displays icons from the Material Symbols font (2,500+ icons included). RadzenIcon provides a simple way to add scalable vector icons to your Blazor application without external dependencies. Uses the embedded Material Symbols Outlined variable font to render icons as text glyphs, providing benefits including no HTTP requests for icon files (icons are part of the font), vector-based icons that scale perfectly at any size, text color inheritance with coloring via IconColor or CSS, access to 2,500+ Material Symbols icons, and support for Outlined (default), Filled, Rounded, and Sharp variants via IconStyle. Icon names use underscores (e.g., "home", "account_circle", "check_circle"). See Material Symbols documentation for the full icon list. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| Icon | `string` | Gets or sets the Material Symbols icon name to display. Use icon names with underscores (e.g., "home", "settings", "account_circle", "check_circle"). See the Material Symbols icon library for available names. |
| IconColor | `string` | Gets or sets a custom color for the icon. Supports any valid CSS color value (e.g., "#FF0000", "rgb(255, 0, 0)", "var(--primary-color)"). If not set, the icon inherits the current text color from its parent. |
| IconStyle | `IconStyle?` | Gets or sets the visual style variant of the icon. Material Symbols supports different styles: Outlined (default), Filled, Rounded, and Sharp. The style affects the icon's visual appearance (e.g., Filled icons have solid shapes vs. outlined strokes). |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `BuildRenderTree(Rendering.RenderTreeBuilder __builder)` | `void` |  |
| `GetComponentCssClass()` | `string` |  |

## Inherited Members

- From [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md): AddContextMenu, Attributes, ContextMenu, Culture, CurrentStyle, Debounce, DefaultCulture, DefaultUICulture, Dispose, Element, GetCssClass, GetId, GetIdAttribute, IsJSRuntimeAvailable, JSRuntime, Localize, MouseEnter, MouseLeave, OnAfterRenderAsync, OnBecameInvisible, OnContextMenu, OnInitialized, OnMouseEnter, OnMouseLeave, RaiseContextMenu, RaiseMouseEnter, RaiseMouseLeave, Reference, SetParametersAsync, Style, UICulture, UniqueID, Visible
- From ComponentBase: Assets, AssignedRenderMode, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnInitializedAsync, OnParametersSet, OnParametersSetAsync, RendererInfo, ShouldRender, StateHasChanged

