For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDGrid

Synopsis

The grid is a 12-point grid system that can adapt based on the size of the screen that is showing the controls.

Syntax

New-UDGrid [-Id <String>] [-ExtraSmallSize <Int32>] [-SmallSize <Int32>] [-MediumSize <Int32>] [-LargeSize <Int32>] [-ExtraLargeSize <Int32>] [-Item] [-Children <ScriptBlock>] [-ClassName <String>] [-Direction <String>] [-RowSpacing <Object>] [-ColumnSpacing <Object>] [-JustifyContent <String>] [-AlignItems <String>] [-Version <String>] [-Style <Hashtable>] [<CommonParameters>]

New-UDGrid [-Id <String>] [-Container] [-Spacing <Int32>] [-Children <ScriptBlock>] [-ClassName <String>] [-Direction <String>] [-RowSpacing <Object>] [-ColumnSpacing <Object>] [-JustifyContent <String>] [-AlignItems <String>] [-Version <String>] [-Style <Hashtable>] [<CommonParameters>]

Description

Creates a grid to layout components. The grid is a 12-point grid system that can adapt based on the size of the screen that is showing the controls.

Parameters

-Id

The ID of the component. It defaults to a random GUID.

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

-ExtraSmallSize

The size (1-12) for extra small devices.

-SmallSize

The size (1-12) for small devices.

-MediumSize

The size (1-12) for medium devices.

-LargeSize

The size (1-12) for large devices.

-ExtraLargeSize

The size (1-12) for extra large devices.

-Container

Whether this is a container. A container can be best described as a row.

-Spacing

Spacing between the items.

-Item

Whether this is an item in a container.

-Children

Components included in this grid item.

-ClassName

A CSS class to apply to the grid.

-Direction

The direction of the grid. Can be row, column, row-reverse or column-reverse.

-RowSpacing

The spacing between rows.

-ColumnSpacing

The spacing between columns.

-JustifyContent

The alignment of the grid items along the main axis. Can be flex-start, flex-end, center, space-between, space-around or space-evenly.

-AlignItems

The alignment of the grid items along the cross axis. Can be flex-start, flex-end, center, baseline or stretch.

-Version

-Style

Common parameters

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Outputs

Examples

Example 1: Basic grid

A basic grid with 3 cards in a row.

Example 2: Responsive Grid

A responsive grid with 3 cards in a row. The cards will stack on small device screens.

Example 3: Grid Spacing

A responsive grid with 3 cards in a row. The spacing between the cards can be changed with the select box.

Example 4: Row and Columns

The row and column aliases can be used to create a grid.

Example 5: Alignment

The alignment of the grid items can be changed with the direction, justifyContent and alignItems parameters.

[Component("Grid", "Grid", "Creates a new card.")]

Last updated

Was this helpful?