Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenGravatar

    A Gravatar avatar component that displays a user's profile image from Gravatar.com based on their email address. RadzenGravatar automatically fetches and displays the globally recognized avatar associated with an email. Gravatar (Globally Recognized Avatar) is a service that associates profile images with email addresses. Fetches avatar using MD5 hash of email address, requires no storage or management of avatar images, shows default retro-style avatar if email has no Gravatar, features configurable pixel dimensions, and uses secure.gravatar.com to retrieve images. Generates a Gravatar URL from the email and displays it as an image. If the email doesn't have a Gravatar account, a retro-style default avatar is shown. Commonly used in user profiles, comment sections, or anywhere user identity is displayed.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    RadzenGravatar
    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 RadzenGravatar : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Examples

    Basic Gravatar:

    <RadzenGravatar Email="user@example.com" />

    Large Gravatar with custom alternate text:

    <RadzenGravatar Email=@currentUser.Email Size="80" AlternateText=@currentUser.Name />

    Gravatar in profile header:

    <RadzenStack Orientation="Orientation.Horizontal" Gap="1rem" AlignItems="AlignItems.Center">
        <RadzenGravatar Email=@user.Email Size="64" />
        <RadzenText TextStyle="TextStyle.H5">@user.Name</RadzenText>
    </RadzenStack>

    Constructors

    RadzenGravatar()

    A Gravatar avatar component that displays a user's profile image from Gravatar.com based on their email address. RadzenGravatar automatically fetches and displays the globally recognized avatar associated with an email. Gravatar (Globally Recognized Avatar) is a service that associates profile images with email addresses. Fetches avatar using MD5 hash of email address, requires no storage or management of avatar images, shows default retro-style avatar if email has no Gravatar, features configurable pixel dimensions, and uses secure.gravatar.com to retrieve images. Generates a Gravatar URL from the email and displays it as an image. If the email doesn't have a Gravatar account, a retro-style default avatar is shown. Commonly used in user profiles, comment sections, or anywhere user identity is displayed.

    Declaration
    public RadzenGravatar()
    Examples

    Basic Gravatar:

    <RadzenGravatar Email="user@example.com" />

    Large Gravatar with custom alternate text:

    <RadzenGravatar Email=@currentUser.Email Size="80" AlternateText=@currentUser.Name />

    Gravatar in profile header:

    <RadzenStack Orientation="Orientation.Horizontal" Gap="1rem" AlignItems="AlignItems.Center">
        <RadzenGravatar Email=@user.Email Size="64" />
        <RadzenText TextStyle="TextStyle.H5">@user.Name</RadzenText>
    </RadzenStack>

    Properties

    AlternateText

    Gets or sets the alternate text describing the avatar for accessibility. This text is read by screen readers and displayed if the image fails to load.

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

    The image alternate text. Default is "gravatar".

    Email

    Gets or sets the email address used to fetch the Gravatar image. The email is hashed (MD5) and used to query Gravatar.com for the associated profile image.

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

    The email address.

    Size

    Gets or sets the size of the avatar image in pixels (both width and height). Gravatar provides square images at various sizes.

    Declaration
    [Parameter]
    public int Size { get; set; }
    Property Value
    Type Description
    int

    The avatar size in pixels. Default is 36.

    Url

    Gets gravatar URL.

    Declaration
    protected string Url { get; }
    Property Value
    Type Description
    string

    Methods

    BuildRenderTree(RenderTreeBuilder)

    A Gravatar avatar component that displays a user's profile image from Gravatar.com based on their email address. RadzenGravatar automatically fetches and displays the globally recognized avatar associated with an email. Gravatar (Globally Recognized Avatar) is a service that associates profile images with email addresses. Fetches avatar using MD5 hash of email address, requires no storage or management of avatar images, shows default retro-style avatar if email has no Gravatar, features configurable pixel dimensions, and uses secure.gravatar.com to retrieve images. Generates a Gravatar URL from the email and displays it as an image. If the email doesn't have a Gravatar account, a retro-style default avatar is shown. Commonly used in user profiles, comment sections, or anywhere user identity is displayed.

    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()

    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