> 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-udcard.md).

# New-UDCard

### Sinopsis

Crea una nueva tarjeta.

### Sintaxis

```powershell
New-UDCard [-Id <String>] [-ClassName <String>] [-Style <Hashtable>] [-Elevation <Int32>] [-Title <String>] [-TitleAlignment <String>] [-Image <String>] [-Text <String>] [-Raised] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]

    New-UDCard [-Id <String>] [-ClassName <String>] [-Header <Object>] [-Body <Object>] [-Expand <Object>] [-Footer <Object>] [-Media <Object>] [-Style <Hashtable>] [-Elevation <Int32>] [-Raised] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]

    New-UDCard [-Id <String>] [-ClassName <String>] [-Style <Hashtable>] [-Elevation <Int32>] [-Title <String>] [-TitleAlignment <String>] [-Content <ScriptBlock>] [-Image <String>] [-Raised] [-Avatar <Object>] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]
```

### Descripción

Crea una nueva tarjeta. Las tarjetas se utilizan para mostrar contenido relacionado.

### Parámetros

#### -Id

El ID del componente. Por defecto es un GUID aleatorio.

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

#### -ClassName

Una clase CSS para asignar a esta tarjeta.

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

#### -Header El encabezado de esta tarjeta. El encabezado suele contener un título para la tarjeta. Utilice New-UDCardHeader para crear un encabezado.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Body El cuerpo de esta tarjeta. Es el contenido principal de la tarjeta. Utilice New-UDCardHeader para crear un cuerpo.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Expand El contenido de expansión de esta tarjeta. El contenido de expansión se muestra cuando el usuario hace clic en el botón de expansión. Utilice New-UDCardExpand para crear una expansión.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Footer El pie de esta tarjeta. El contenido del pie suele contener acciones relevantes para la tarjeta. Utilice New-UDCardFooter para crear un pie.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Media Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-StyleEstilos que se aplicarán a la tarjeta.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ElevationLa cantidad de elevación que se proporciona a la tarjeta. Cuanta más elevación, más parecerá que la tarjeta flota sobre la página.Required?                    falsePosition?                    namedDefault value                0Accept pipeline input?       falseAliasesAccept wildcard characters?  false-TitleUn título para la tarjeta.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-TitleAlignmentLa alineación del título.Required?                    falsePosition?                    namedDefault value                leftAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ContentEl contenido de la tarjeta.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ImageUna imagen para mostrar en la tarjeta.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-TextRequired?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Raised \[\<SwitchParameter>]Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Avatar Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Sx Estilo basado en el tema que se aplicará a la tarjeta.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-VariantRequired?                    falsePosition?                    namedDefault value                elevationAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnClickLa acción que se realiza cuando se hace clic en la tarjeta.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -RemoveMargin \[\<SwitchParameter>]Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).Salidas--------------------------> EJEMPLO 1 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card1'Basic card|A basic card with a title and text.-------------------------- EXAMPLE 2 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card2' -Image '<https://picsum.photos/200/300>' -Style @{ width = '200px' }Card with image|A card with an image.-------------------------- EXAMPLE 3 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card3' -Elevation 10Card with elevation|A card with a higher elevation.-------------------------- EXAMPLE 4 --------------------------PS >New-UDCard -Title 'My Card' -Text 'This is my card' -Id 'card4' -TitleAlignment centerTitle Alignment|A card with a centered title.-------------------------- EXAMPLE 5 --------------------------PS >New-UDCard -Text 'This is my card' -OnClick {PS >     Show-UDToast -Message 'You clicked the card'PS > } -Id 'card5'OnClick|A card with an OnClick event handler.-------------------------- EXAMPLE 6 --------------------------PS >$Header = New-UDCardHeader -Avatar (New-UDAvatar -Content { "R" } -Sx @{ backgroundColor = "#f44336" }) -Action (New-UDIconButton -Icon (New-UDIcon -Icon 'EllipsisVertical')) -Title 'Shrimp and Chorizo Paella' -SubHeader 'September 14, 2016';PS >     $Media = New-UDCardMedia -Image '<https://mui.com/static/images/cards/paella.jpg'PS> >     $Body = New-UDCardBody -Content {PS >         New-UDTypography -Text ' This impressive paella is a perfect party dish and a fun meal to cook together with your guests. Add 1 cup of frozen peas along with the mussels, if you like.' -Sx @{PS >             color = 'text.secondary'PS >         } -Variant body2PS >     }PS >     $Footer = New-UDCardFooter -Content {PS >         New-UDIconButton -Icon (New-UDIcon -Icon 'Heart')PS >         New-UDIconButton -Icon (New-UDIcon -Icon 'ShareAlt')PS >     }PS >     $Expand = New-UDCardExpand -Content {PS >         $Description = "Heat oil in a (14- to 16-inch) paella pan or a large, deep skillet over medium-high heat. Add chicken, shrimp and chorizo, and cook, stirring occasionally until lightly browned, 6 to 8 minutes. Transfer shrimp to a large plate and set aside, leaving chicken and chorizo in the pan. Add pimentón, bay leaves, garlic, tomatoes, onion, salt and pepper, and cook, stirring often until thickened and fragrant, about 10 minutes. Add saffron broth and remaining 4 1/2 cups chicken broth; bring to a boil."PS >         New-UDTypography -Text $DescriptionPS >     }PS >     New-UDCard -Header $Header -Media $Media -Body $Body -Footer $Footer -Expand $Expand -Sx @{PS >         maxWidth = 345PS >         border   = '2px solid #f0f2f5'PS >     } -Id 'card5'Complex Card|A card with all the features.-------------------------- EXAMPLE 7 --------------------------PS >$Expand = New-UDCardExpand -Content { "$(Get-Random)" } -DynamicPS > New-UDCard -Expand $Expand -Id 'card6'Dynamic Expand|A card with a dynamic expandable content. The content will be updated every time the card is expanded.


---

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