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

# Transizioni

Le transizioni consentono di far entrare e uscire i componenti dalla vista all'interno della dashboard utilizzando varie animazioni. È possibile sfruttare cmdlet interattivi come `Set-UDElement` per modificare lo stato della transizione e far entrare un elemento.

Nell'esempio seguente, abbiamo una card che entra tramite una transizione Fade. Facendo clic sull'interruttore si attiva o disattiva la card.

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

L'effetto risultante è il seguente.

![Transition a card](/files/7nUbVSqB6M5RQdLpa06Z)

## Collapse

La transizione collapse comprime ed espande una sezione. È possibile specificare un'altezza di compressione per comprimere solo una porzione della sezione.

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

![Collapse Transition](/files/xdiRhqFtW0ijclaALjFb)

## Fade

Una transizione fade fa apparire e scomparire un componente in dissolvenza, come visto nell'esempio precedente. È possibile configurare il valore di timeout per specificare il numero di secondi necessari per completare la transizione.

```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 transizione slide sposta un componente in posizione. È possibile determinare la posizione dello scorrimento specificando il parametro `-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
```

![Slide Transition](/files/w6Bxv2UwgTWiBEQAAzzi)

## Grow

La transizione grow fa apparire in dissolvenza e ingrandisce un componente fino a portarlo in posizione.

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

![Grow Transition](/files/Zj6WSOBDaR7aszOelbHb)

## Zoom

La transizione zoom porta un componente in posizione con un effetto di 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
```

![Zoom Transition](/files/uVjjb2BcJefYoS5sCbIH)

## API

* [New-UDTransition](/powershell-universal/it/comandi-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/it/app/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.
