> 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/applis/components/utilities/transitions.md).

# Transitions

Animez les composants d'appli PowerShell Universal avec New-UDTransition, en utilisant les effets collapse, fade, slide, grow et zoom déclenchés par les changements d'état des éléments.

Les transitions vous permettent de faire apparaître et disparaître des composants dans votre tableau de bord à l'aide de diverses animations. Vous pouvez tirer parti d'applets de commande interactives comme `Set-UDElement` pour modifier l'état de la transition et faire entrer un élément.

Dans l'exemple suivant, nous avons une carte qui apparaît au moyen d'un fondu (Fade). Cliquer sur l'interrupteur fait apparaître et disparaître la carte.

```powershell
New-UDTransition -Id 'test' -Content {
    New-UDCard -Text "Hey"
} -In -Fade -Timeout 1000

New-UDSwitch -OnChange {
    Set-UDElement -Id 'test' -Properties @{
        in = $EventData -eq 'True'
    }
} -Checked $true
```

## Collapse

La transition collapse réduit et déploie une section. Vous pouvez spécifier une hauteur de réduction pour ne réduire qu'une partie de la section.

```powershell
New-UDTransition -Id 'test' -Content {
    New-UDCard -Text "Hey"
} -In -Collapse -CollapseHeight 100 -Timeout 1000

New-UDSwitch -OnChange {
    Set-UDElement -Id 'test' -Properties @{
        in = $EventData -eq 'True'
    }
} -Checked $true
```

## Fade

Une transition fade fait apparaître et disparaître un composant en fondu, comme dans l'exemple précédent. Vous pouvez configurer la valeur du délai d'attente pour spécifier le nombre de secondes nécessaires à l'achèvement de la transition.

```powershell
New-UDTransition -Id 'test' -Content {
    New-UDCard -Text "Hey"
} -In -Fade -Timeout 1000

New-UDSwitch -OnChange {
    Set-UDElement -Id 'test' -Properties @{
        in = $EventData -eq 'True'
    }
} -Checked $true
```

## Slide

La transition slide déplace un composant jusqu'à sa position. Vous pouvez déterminer la position du glissement en spécifiant le paramètre `-SlideDirection`.

```powershell
New-UDTransition -Id 'test' -Content {
    New-UDCard -Text "Hey"
} -In -Slide -SlideDirection 'left' -Timeout 1000

New-UDSwitch -OnChange {
    Set-UDElement -Id 'test' -Properties @{
        in = $EventData -eq 'True'
    }
} -Checked $true
```

## Grow

La transition grow fait apparaître un composant en fondu et en l'agrandissant jusqu'à sa place.

```powershell
New-UDTransition -Id 'test' -Content {
    New-UDCard -Text "Hey"
} -In -Grow -Timeout 1000

New-UDSwitch -OnChange {
    Set-UDElement -Id 'test' -Properties @{
        in = $EventData -eq 'True'
    }
} -Checked $true
```

## Zoom

La transition zoom amène un composant à sa place avec un effet de zoom.

```powershell
New-UDTransition -Id 'test' -Content {
    New-UDCard -Text "Hey"
} -In -Zoom -Timeout 1000

New-UDSwitch -OnChange {
    Set-UDElement -Id 'test' -Properties @{
        in = $EventData -eq 'True'
    }
} -Checked $true
```

## API

* [New-UDTransition](/powershell-universal/fr/commandes-powershell/new-udtransition.md)


---

# 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/fr/applis/components/utilities/transitions.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.
