# RadzenGravatar Class

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.

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

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender

## Syntax

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

## Examples

Basic Gravatar:

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

Large Gravatar with custom alternate text:

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

Gravatar in profile header:

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

## Constructors

| Constructor | Description |
|-------------|-------------|
| `public 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. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| AlternateText | `string` | 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. |
| Email | `string` | 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. |
| Size | `int` | Gets or sets the size of the avatar image in pixels (both width and height). Gravatar provides square images at various sizes. |
| Url | `string` | Gets gravatar URL. |

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

