A hyperlink component for navigation within the application or to external URLs. RadzenLink provides styled links with icon support, active state highlighting, and disabled states. Enables navigation styled according to the application theme. Supports internal navigation using Path for Blazor routing without page reloads, external links opening in same or new window via Target property, automatic highlighting when the current URL matches the link path, optional icon before text via Icon property, alternative icon using custom image via Image property, disabled state that prevents navigation and changes visual appearance, and prefix or exact matching for active state detection. For internal navigation, uses Blazor's NavigationManager for client-side routing. For external URLs, use Target="_blank" to open in a new tab.
IComponent
IHandleEvent
IHandleAfterRender
RadzenComponent.SetParametersAsync
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenLink : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRenderInternal navigation link:
<RadzenLink Path="/products" Text="View Products" Icon="shopping_cart" />
External link opening in new tab:
<RadzenLink Path="https://radzen.com" Text="Visit Radzen" Target="_blank" Icon="open_in_new" />
Link with custom content:
<RadzenLink Path="/dashboard">
<RadzenIcon Icon="dashboard" /> Go to Dashboard
</RadzenLink>A hyperlink component for navigation within the application or to external URLs. RadzenLink provides styled links with icon support, active state highlighting, and disabled states. Enables navigation styled according to the application theme. Supports internal navigation using Path for Blazor routing without page reloads, external links opening in same or new window via Target property, automatic highlighting when the current URL matches the link path, optional icon before text via Icon property, alternative icon using custom image via Image property, disabled state that prevents navigation and changes visual appearance, and prefix or exact matching for active state detection. For internal navigation, uses Blazor's NavigationManager for client-side routing. For external URLs, use Target="_blank" to open in a new tab.
public RadzenLink()Gets or sets custom child content to render as the link content. When set, overrides the Text property for complex link content with custom markup.
public RenderFragment ChildContent { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets custom child content to render as the link content. When set, overrides the Text property for complex link content with custom markup. |
Gets or sets whether the link is disabled and cannot be clicked. When disabled, the link appears grayed out and does not navigate.
public bool Disabled { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets whether the link is disabled and cannot be clicked. When disabled, the link appears grayed out and does not navigate. |
Gets or sets the Material icon name to display before the link text. Use Material Symbols icon names (e.g., "home", "settings", "open_in_new").
public string Icon { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the Material icon name to display before the link text. Use Material Symbols icon names (e.g., "home", "settings", "open_in_new"). |
Gets or sets a custom color for the icon. Supports any valid CSS color value. If not set, icon inherits the link color.
public string IconColor { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets a custom color for the icon. Supports any valid CSS color value. If not set, icon inherits the link color. |
Gets or sets a custom image URL to display before the link text instead of an icon. Alternative to using Icon for custom graphics.
public string Image { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets a custom image URL to display before the link text instead of an icon. Alternative to using Icon for custom graphics. |
Gets or sets the alternate text for the image when using the Image property. Provides accessibility text for screen readers when an image is used instead of an icon.
public string ImageAlternateText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the alternate text for the image when using the Image property. Provides accessibility text for screen readers when an image is used instead of an icon. |
Gets or sets how the link's active state is determined by comparing the current URL to the link path. Prefix matches when URL starts with path, All requires exact match.
public Routing.NavLinkMatch Match { get; set; }
| Type | Description |
|---|---|
| Routing.NavLinkMatch | Gets or sets how the link's active state is determined by comparing the current URL to the link path. Prefix matches when URL starts with path, All requires exact match. |
Gets or sets the URL path for navigation. Can be a relative path for internal navigation (e.g., "/products") or an absolute URL for external sites.
public string Path { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the URL path for navigation. Can be a relative path for internal navigation (e.g., "/products") or an absolute URL for external sites. |
Gets or sets the target window or frame for the link navigation. Use "_blank" for new tab, "_self" for same window, or custom frame names.
public string Target { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the target window or frame for the link navigation. Use "_blank" for new tab, "_self" for same window, or custom frame names. |
Gets or sets the link text to display. For simple text links, use this property. For complex content, use ChildContent instead.
public string Text { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the link text to display. For simple text links, use this property. For complex content, use ChildContent instead. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
Gets the target.
protected string GetTarget()
| Type | Description |
|---|---|
| string |