> 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/fr/apps/components/surfaces/card.md).

# Carte

**Les cartes contiennent du contenu et des actions relatifs à un seul sujet.**

Les cartes sont des surfaces qui affichent du contenu et des actions sur un seul sujet. Elles doivent être faciles à parcourir pour repérer les informations pertinentes et exploitables. Les éléments, tels que le texte et les images, doivent y être disposés de manière à indiquer clairement la hiérarchie.

## Carte simple

Bien que les cartes puissent prendre en charge plusieurs actions, des contrôles d'interface utilisateur et un menu déroulant, faites preuve de retenue et rappelez-vous que les cartes sont des points d'entrée vers des informations plus complexes et détaillées.

![](/files/U88dFBcc3LlYfaZCJa1Q)

```powershell
New-UDCard -Title 'Simple Card' -Content {
    "This is some content"
}
```

## Carte avancée

Vous pouvez utiliser les cmdlets body, header, footer et expand pour créer des cartes avancées. L'exemple ci-dessous crée une carte avec diverses fonctionnalités basée sur une machine virtuelle Hyper-V.

```powershell
$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';
$Media = New-UDCardMedia -Image 'https://mui.com/static/images/cards/paella.jpg'
$Body = New-UDCardBody -Content {
    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 @{
        color = 'text.secondary'
    } -Variant body2
}
$Footer = New-UDCardFooter -Content {
    New-UDIconButton -Icon (New-UDIcon -Icon 'Heart')
    New-UDIconButton -Icon (New-UDIcon -Icon 'ShareAlt')
}
$Expand = New-UDCardExpand -Content {
    $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.
    New-UDTypography -Text $Description
}
New-UDCard -Header $Header -Media $Media -Body $Body -Footer $Footer -Expand $Expand -Sx @{
    maxWidth = 345
    border   = '2px solid #f0f2f5'
}
```

<figure><img src="/files/ZPdNzbpAWLcXaHBowdLw" alt=""><figcaption></figcaption></figure>

## API

* [New-UDCard](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDCard.txt)
* [New-UDCardBody](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDCardBody.txt)
* [New-UDCardExpand](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDCardExpand.txt)
* [New-UDCardFooter](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDCardFooter.txt)
* [New-UDCardHeader](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDCardHeader.txt)
* [New-UDCardMedia](https://github.com/ironmansoftware/universal-docs/blob/v5/cmdlets/New-UDCardMedia.txt)


---

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

```
GET https://docs.devolutions.net/powershell-universal/fr/apps/components/surfaces/card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
