New-UDGridLayout
Synopsis
Creates a new grid layout. Grid layout allows you to drag and drop components into a grid.
Syntax
New-UDGridLayout [[-Id] <String>] [[-RowHeight] <Int32>] [-Content] <ScriptBlock> [[-Layout] <String>] [[-LargeColumns] <Int32>] [[-MediumColumns] <Int32>] [[-SmallColumns] <Int32>] [[-ExtraSmallColumns] <Int32>] [[-ExtraExtraSmallColumns] <Int32>] [[-LargeBreakpoint] <Int32>] [[-MediumBreakpoint] <Int32>] [[-SmallBreakpoint] <Int32>] [[-ExtraSmallBreakpoint] <Int32>] [[-ExtraExtraSmallBreakpoint] <Int32>] [-Draggable] [-Resizable] [-Persist] [-Design] [<CommonParameters>]Description
Creates a new grid layout. Grid layout allows you to drag and drop components into a grid.
Parameters
-Id
The ID of this component. The default value is a random GUID.
Required? false
Position? 1
Default value ([Guid]::NewGuid()).ToString()
Accept pipeline input? false
Aliases
Accept wildcard characters? false-RowHeight
The height of each row in pixels. The default value is 30.
-Content
The content of the grid layout. This is a scriptblock that returns a list of components. Components are required to have static IDs.
-Layout
The layout of the grid. This should be a JSON string.
-LargeColumns
The number of columns in the large breakpoint. The default value is 12.
-MediumColumns
The number of columns in the medium breakpoint. The default value is 10.
-SmallColumns
The number of columns in the small breakpoint. The default value is 6.
-ExtraSmallColumns
The number of columns in the extra small breakpoint. The default value is 4.
-ExtraExtraSmallColumns
The number of columns in the extra extra small breakpoint. The default value is 2.
-LargeBreakpoint
The width of the large breakpoint in pixels. The default value is 1200.
-MediumBreakpoint
The width of the medium breakpoint in pixels. The default value is 996.
-SmallBreakpoint
The width of the small breakpoint in pixels. The default value is 768.
-ExtraSmallBreakpoint
The width of the extra small breakpoint in pixels. The default value is 480.
-ExtraExtraSmallBreakpoint
The width of the extra extra small breakpoint in pixels. The default value is 0.
-Draggable
Whether or not the components can be dragged.
-Resizable
Whether or not the components can be resized.
-Persist
Whether or not the layout should be persisted in the current browser session.
-Design
Whether or not the grid layout is in design mode. Design mode allows for copying of the current JSON layout.
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 Layout
Create a basic grid layout with two cards.
Example 2: Draggable and Resizable
Create a grid layout with two cards that can be dragged and resized. This layout is also in design mode which allows you to copy the current layout as JSON.
Example 3: Persisted Layout
This layout is also persisted in the current browser session. Refresh the page to see the persisted layout.
[Component("Grid Layout", "TableLayout", "Creates a new card.")]
Last updated
Was this helpful?