> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/comandos-de-powershell/new-udavatar.md).

# New-UDAvatar

New-UDAvatar crea un componente de avatar en PowerShell Universal que muestra una imagen de usuario o un icono dentro de un panel.

### Sinopsis

Crea un nuevo Avatar.

### Sintaxis

```powershell
New-UDAvatar [[-Id] <String>] [[-Image] <String>] [[-Alt] <String>] [[-ClassName] <String>] [[-Variant] <String>] [[-Sx] <Object>] [[-Children] <ScriptBlock>] [<CommonParameters>]
```

### Descripción

Crea un nuevo Avatar. Un avatar suele ser una imagen de un usuario.

### Parámetros

#### -Id

El ID del componente. De forma predeterminada, es un GUID aleatorio.

```
Required?                    false
Position?                    1
Default value                ([Guid]::NewGuid()).ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Image

La URL de una imagen que se mostrará en el avatar.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Alt

El texto alternativo que se asignará al avatar.

```
Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

Clases que se asignarán al componente de avatar.

```
Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Variant

El tipo de variante del avatar. Los valores válidos son: "square", "rounded"

```
Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Sx

La propiedad sx le permite definir estilos CSS personalizados que se aplicarán al componente.

```
Required?                    false
Position?                    6
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Children

El contenido que se mostrará dentro del avatar.

```
Required?                    false
Position?                    7
Default value                { "A" }
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Parámetros comunes

Este cmdlet admite los parámetros comunes: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable y OutVariable. Para obtener más información, consulte [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Salidas

### Ejemplos

#### Ejemplo 1: avatar básico

```powershell
New-UDAvatar -Alt "Remy Sharp" -Image "/assets/logo.png"
```

Muestra un avatar básico con una imagen.

#### Ejemplo 2: avatar cuadrado

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content { "B" } -Variant square
```

Muestra un avatar cuadrado con una imagen.

#### Ejemplo 3: avatar con texto

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
} -Sx @{
  borderRadius = '50%'
}
```

Muestra un avatar con texto y estilos CSS personalizados.

#### Ejemplo 4: grupo de avatares

```powershell
New-UDAvatarGroup -Content {
  1..10 | ForEach-Object {
    New-UDAvatar -Alt "Remy Sharp" -Content {
        "A"
    } -Sx @{
        borderRadius    = '50%'
        backgroundColor = 'error.dark'
    }
  }
} -Sx @{
   width = "20%"
}
```

Muestra un grupo de avatares.

#### Ejemplo 5: tamaños

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
} -Sx @{
  width = 24
  height = 24
}
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
}
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
} -Sx @{
  width = 56
  height = 56
}
```

Muestra un grupo de avatares con diferentes tamaños.

#### Ejemplo 6: iconos

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content {
  New-UDIcon -Icon "User"
}
```

Muestra un avatar con un icono.

#### Ejemplo 7: reserva

```powershell
New-UDAvatar -Alt "Remy Sharp" -Image "/broken.png" -Content { "A" }
```

Muestra un avatar con una reserva ante una imagen rota.

#### Ejemplo 8: insignia

```powershell
New-UDBadge -BadgeContent {
    10
} -Children {
    New-UDAvatar
}
```

Muestra un avatar con una insignia.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/es/comandos-de-powershell/new-udavatar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
