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

# Transiciones

Las transiciones le permiten hacer que los componentes aparezcan y desaparezcan de la vista en su panel mediante diversas animaciones. Puede aprovechar cmdlets interactivos como `Set-UDElement` para cambiar el estado de la transición y provocar que un elemento entre en escena.

En el siguiente ejemplo, tenemos una tarjeta que aparece mediante un desvanecimiento. Al hacer clic en el interruptor se alterna la aparición y desaparición de la tarjeta.

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

El efecto resultante es el siguiente.

![Transición de una tarjeta](/files/PuAMMbioRrCKF0oFm2LQ)

## Contracción

La transición de contracción contraerá y expandirá una sección. Puede especificar una altura de contracción para contraer solo una parte de la sección.

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

![Transición de contracción](/files/L8oZJ9fZAqnFovgKL7id)

## Desvanecimiento

Una transición de desvanecimiento hace que un componente aparezca y desaparezca gradualmente, como se ha visto en el ejemplo anterior. Puede configurar el valor de tiempo de espera para especificar el número de segundos que tarda en completarse la transición.

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

## Deslizamiento

La transición de deslizamiento mueve un componente hasta su posición. Puede determinar la posición del deslizamiento especificando el parámetro `-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
```

![Transición de deslizamiento](/files/5zsFKmuPue6HHZhaPGn4)

## Crecimiento

La transición de crecimiento hará que un componente se desvanezca y crezca hasta su posición.

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

![Transición de crecimiento](/files/p6GakNv7lcs8JA5Z1vkC)

## Zoom

La transición de zoom hará que un componente se acerque hasta su posición.

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

![Transición de zoom](/files/NjLjHByjfi2ss4Qy18qK)

## API

* [New-UDTransition](/powershell-universal/es/comandos-de-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/es/aplicaciones/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.
