Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    RadzenLink
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(MouseEventArgs)
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.OnInitialized()
    RadzenComponent.SetParametersAsync(ParameterView)
    RadzenComponent.OnAfterRenderAsync(bool)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.AddContextMenu()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Dispose()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.CurrentStyle
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenLink : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Examples

    Internal 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>

    Constructors

    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.

    Declaration
    public RadzenLink()
    Examples

    Internal 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>

    Properties

    ChildContent

    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.

    Declaration
    [Parameter]
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    The link content render fragment.

    Disabled

    Gets or sets whether the link is disabled and cannot be clicked. When disabled, the link appears grayed out and does not navigate.

    Declaration
    [Parameter]
    public bool Disabled { get; set; }
    Property Value
    Type Description
    bool

    true if the link is disabled; otherwise, false. Default is false.

    Icon

    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").

    Declaration
    [Parameter]
    public string Icon { get; set; }
    Property Value
    Type Description
    string

    The Material icon name.

    IconColor

    Gets or sets a custom color for the icon. Supports any valid CSS color value. If not set, icon inherits the link color.

    Declaration
    [Parameter]
    public string IconColor { get; set; }
    Property Value
    Type Description
    string

    The icon color as a CSS color value.

    Image

    Gets or sets a custom image URL to display before the link text instead of an icon. Alternative to using Icon for custom graphics.

    Declaration
    [Parameter]
    public string Image { get; set; }
    Property Value
    Type Description
    string

    The image URL or path.

    ImageAlternateText

    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.

    Declaration
    [Parameter]
    public string ImageAlternateText { get; set; }
    Property Value
    Type Description
    string

    The image alternate text. Default is "image".

    Match

    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.

    Declaration
    [Parameter]
    public NavLinkMatch Match { get; set; }
    Property Value
    Type Description
    NavLinkMatch

    The navigation link match mode. Default is Prefix.

    Path

    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.

    Declaration
    [Parameter]
    public string Path { get; set; }
    Property Value
    Type Description
    string

    The navigation path or URL. Default is empty string.

    Target

    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.

    Declaration
    [Parameter]
    public string Target { get; set; }
    Property Value
    Type Description
    string

    The target window/frame. Default is null (same window).

    Text

    Gets or sets the link text to display. For simple text links, use this property. For complex content, use ChildContent instead.

    Declaration
    [Parameter]
    public string Text { get; set; }
    Property Value
    Type Description
    string

    The link text. Default is empty string.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    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.

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    string
    Overrides
    RadzenComponent.GetComponentCssClass()

    GetPath()

    Gets the path.

    Declaration
    protected string GetPath()
    Returns
    Type Description
    string

    GetTarget()

    Gets the target.

    Declaration
    protected string GetTarget()
    Returns
    Type Description
    string

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT