> 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/powershell-commands/new-udtransition.md).

# New-UDTransition

New-UDTransition animates a component with collapse, fade, grow, slide, or zoom effects when it enters or leaves a PowerShell Universal page.

### Synopsis

Creates a transition effect.

### Syntax

```powershell
New-UDTransition [-Id <String>] [-Collapse] [-CollapseHeight <Int32>] -Children <ScriptBlock> [-In] [-Timeout <Int32>] [-Style <Hashtable>] [-MountOnEnter] [-UnmountOnExit] [<CommonParameters>]

New-UDTransition [-Id <String>] [-Fade] -Children <ScriptBlock> [-In] [-Timeout <Int32>] [-Style <Hashtable>] [-MountOnEnter] [-UnmountOnExit] [<CommonParameters>]

New-UDTransition [-Id <String>] [-Grow] -Children <ScriptBlock> [-In] [-Timeout <Int32>] [-Style <Hashtable>] [-MountOnEnter] [-UnmountOnExit] [<CommonParameters>]

New-UDTransition [-Id <String>] [-Slide] [-SlideDirection <String>] -Children <ScriptBlock> [-In] [-Timeout <Int32>] [-Style <Hashtable>] [-MountOnEnter] [-UnmountOnExit] [<CommonParameters>]

New-UDTransition [-Id <String>] [-Zoom] -Children <ScriptBlock> [-In] [-Timeout <Int32>] [-Style <Hashtable>] [-MountOnEnter] [-UnmountOnExit] [<CommonParameters>]
```

### Description

Creates a transition effect.

### Parameters

#### -Id

The ID of this component.

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

#### -Collapse

Creates a collapse transition.

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

#### -CollapseHeight

The height of the content when collapsed.

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

#### -Fade

Creates a fade transition.

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

#### -Grow

Creates a grow transition.

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

#### -Slide

Creates a slide transition.

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

#### -SlideDirection

The direction of the slide transition.

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

#### -Zoom

Creates a zoom transition.

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

#### -Children

The content or children to transition.

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

#### -In

Whether the content is transitioned in. You can use Set-UDElement to trigger a transition.

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

#### -Timeout

The number of milliseconds it takes to transition.

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

#### -Style

A hashtable of CSS styles to apply to the transition.

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

#### -MountOnEnter

Whether to mount the content when entering the transition.

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

#### -UnmountOnExit

Whether to unmount the content when exiting the transition.

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

#### Common parameters

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

### Outputs

### Examples

#### Example 1: Fade

```powershell
New-UDTransition -Fade -In -Children {
   New-UDButton -Text 'Click Me'  -Id 'button1'
} -Id 'transition1' -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition1' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A fade transition.

#### Example 2: Slide

```powershell
New-UDTransition -Slide -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button2'
} -Id 'transition2'  -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition2' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A slide transition.

#### Example 3: Zoom

```powershell
New-UDTransition -Zoom -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button3'
} -Id 'transition3'  -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition3' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A zoom transition.

#### Example 4: Grow

```powershell
New-UDTransition -Grow -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button4'
} -Id 'transition4'  -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition4' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A grow transition.

#### Example 5: Collapse

```powershell
New-UDTransition -Collapse -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button5'
} -Id 'transition5'  -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition5' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A collapse transition.

#### Example 6: Collapse Height

```powershell
New-UDTransition -Collapse -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button6'
} -Id 'transition6' -CollapseHeight 100  -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition6' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A collapse transition with 100 height.

#### Example 7: Slide Direction

```powershell
New-UDTransition -Slide -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button7'
} -Id 'transition7' -SlideDirection 'Left'  -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition7' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A slide transition with left direction.

#### Example 8: Timeout

```powershell
New-UDTransition -Fade -In -Children {
   New-UDButton -Text 'Click Me' -Id 'button8'
} -Id 'transition8' -Timeout 1000
New-UDCheckbox -Label 'Toggle' -OnChange {
   Set-UDElement -Id 'transition8' -Properties @{
       In = $EventData
   }
} -Checked $true
```

A fade transition with 1000 timeout.


---

# 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/powershell-commands/new-udtransition.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.
