> 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/comandos-de-powershell/new-udstack.md).

# New-UDStack

New-UDStack organiza los componentes hijos a lo largo de un eje vertical u horizontal en PowerShell Universal, con espaciado opcional y divisores entre ellos.

### Sinopsis

El componente Stack gestiona la disposición de los hijos inmediatos a lo largo del eje vertical u horizontal con espaciado y/o divisores opcionales entre cada hijo.

### Sintaxis

```powershell
New-UDStack [[-Id] <String>] [-Children] <ScriptBlock> [[-Divider] <ScriptBlock>] [[-Spacing] <Int32>] [[-Direction] <String>] [-FullWidth] [[-AlignItems] <String>] [[-JustifyContent] <String>] [<CommonParameters>]
```

### Descripción

Stack se ocupa de las disposiciones unidimensionales, mientras que Grid gestiona las disposiciones bidimensionales. La dirección predeterminada es column, que apila los hijos verticalmente.

### Parámetros

#### -Id

El ID de este componente.

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

#### -Children

Los hijos que se van a apilar.

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

#### -Divider

Un componente divisor opcional.

```
Required?                    false
Position?                    3
Default value                {}
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Spacing

El espaciado entre los elementos.

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

#### -Direction

La dirección de la pila. La dirección predeterminada es column, que apila los hijos verticalmente. Los valores válidos son row, column, row-reverse y column-reverse.

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

#### -FullWidth

Si se establece, la pila ocupará todo el ancho de su contenedor.

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

#### -AlignItems

Define la propiedad de estilo align-items. Se aplica a todos los tamaños de pantalla. Los valores válidos son flex-start, flex-end, center, stretch y baseline.

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

#### -JustifyContent

Define la propiedad de estilo justify-content. Se aplica a todos los tamaños de pantalla. Los valores válidos son flex-start, flex-end, center, space-between, space-around y space-evenly.

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

#### Parámetros comunes

Este cmdlet admite los parámetros comunes: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable y OutVariable. Para obtener más información, consulte [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Salidas

### Ejemplos

#### Ejemplo 1: pila básica

```powershell
New-UDStack -Content {
   New-UDCard -Text "Card 1" -RemoveMargin
   New-UDCard -Text "Card 2" -RemoveMargin
   New-UDCard -Text "Card 3" -RemoveMargin
} -Spacing 2 -Id 'stack1'
```

Una pila básica.

#### Ejemplo 2: dirección

```powershell
New-UDStack -Content {
   New-UDCard -Text "Card 1" -RemoveMargin
   New-UDCard -Text "Card 2" -RemoveMargin
   New-UDCard -Text "Card 3" -RemoveMargin
} -Spacing 2 -Id 'stack2' -Direction 'column'
```

Una pila en dirección de columna.

#### Ejemplo 3: fila invertida

```powershell
New-UDStack -Content {
   New-UDCard -Text "Card 1" -RemoveMargin
   New-UDCard -Text "Card 2" -RemoveMargin
   New-UDCard -Text "Card 3" -RemoveMargin
} -Spacing 2 -Id 'stack3' -Direction 'row-reverse'
```

Una pila de fila invertida.

#### Ejemplo 4: alineación

```powershell
New-UDStack -Content {
   New-UDCard -Text "Card 1" -RemoveMargin
   New-UDCard -Text "Card 2" -RemoveMargin
   New-UDCard -Text "Card 3" -RemoveMargin
} -Spacing 2 -Id 'stack4' -AlignItems 'center'
```

Una pila centrada.

#### Ejemplo 5: divisor

```powershell
New-UDStack -Content {
   New-UDCard -Text "Card 1" -RemoveMargin
   New-UDCard -Text "Card 2" -RemoveMargin
   New-UDCard -Text "Card 3" -RemoveMargin
} -Spacing 2 -Id 'stack5' -Divider {
   New-UDDivider
}
```

Una pila con un divisor.

#### Ejemplo 6: justificar contenido

```powershell
New-UDStack -Content {
   New-UDCard -Text "Card 1" -RemoveMargin
   New-UDCard -Text "Card 2" -RemoveMargin
   New-UDCard -Text "Card 3" -RemoveMargin
} -Spacing 2 -Id 'stack6' -AlignItems 'center' -JustifyContent 'space-between'
```

Una pila con contenido justificado.


---

# 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/comandos-de-powershell/new-udstack.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.
