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

# New-UDTransition

New-UDTransition animerer en komponent med effekterne collapse, fade, grow, slide eller zoom, når den kommer ind på eller forlader en side i PowerShell Universal.

### Synopsis

Opretter en overgangseffekt.

### Syntaks

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

### Beskrivelse

Opretter en overgangseffekt.

### Parametre

#### -Id

Id for denne komponent.

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

#### -Collapse

Opretter en collapse-overgang.

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

#### -CollapseHeight

Højden på indholdet, når det er sammenklappet.

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

#### -Fade

Opretter en fade-overgang.

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

#### -Grow

Opretter en grow-overgang.

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

#### -Slide

Opretter en slide-overgang.

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

#### -SlideDirection

Retningen af slide-overgangen.

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

#### -Zoom

Opretter en zoom-overgang.

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

#### -Children

Indholdet eller de underordnede elementer, der skal have en overgang.

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

#### -In

Om indholdet vises med en overgang. De kan bruge Set-UDElement til at udløse en overgang.

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

#### -Timeout

Antallet af millisekunder, som overgangen tager.

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

#### -Style

En hashtable med CSS-typografier, der skal anvendes på overgangen.

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

#### -MountOnEnter

Om indholdet skal monteres, når overgangen indtrædes.

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

#### -UnmountOnExit

Om indholdet skal afmonteres, når overgangen forlades.

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

#### Fælles parametre

Denne cmdlet understøtter de fælles parametre: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable og OutVariable. Se [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216) for at få flere oplysninger.

### Output

### Eksempler

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

En fade-overgang.

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

En slide-overgang.

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

En zoom-overgang.

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

En grow-overgang.

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

En collapse-overgang.

#### Eksempel 6: Collapse-højde

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

En collapse-overgang med højden 100.

#### Eksempel 7: Slide-retning

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

En slide-overgang med retning mod venstre.

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

En fade-overgang med timeout på 1000.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/da/powershell-kommandoer/new-udtransition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
