Movatterモバイル変換


[0]ホーム

URL:


LogoLogo
Ctrlk
Sign upHelp Center
Powered by GitBook
On this page

UIGridContainerElement


Represents a container with a grid layout in a panel.

By default, the grid items are vertically stacked, but you can change the grid to use a different layout by setting thegrid property to a different value.

grid property is the exact same as CSS's shorthand propertygrid.See the MDN documentation for more details.

You can understandUIPanelbody andfooter properties as grid containers using default vertical stack layout.

Horizontal stack

As part of CSS Grid Layout capabilities it is possible to create a horizontal stack.

Alignment & Distribution

On horizontal stacks, it is possible to align and distribute the items.

verticalAlignment is used to align the items vertically. By default, items are aligned to the top of the container. It follows the same values as CSS'salign-items property. SeeMDN documentation for more details.

horizontalDistribution is used to justify the items horizontally. By default, items are justified to the start of the container. It follows the same values as CSS'sjustify-content property. SeeMDN documentation for more details.

Equal width columns

Horizontal stack
Two columns, each sharing 50% of the container width

FlexibleSpace element

FlexibleSpace element is a handy solution to allow more control over grid layout.

Ifgrid is not set,FlexibleSpace will add some space between the items. By usinggrid property it is possible to control FlexibleSpace's size.

to right align the input

Flexible space to right align the input
Flexible space takes 50% of the container width

two columns of buttons with space between them

Two groups of buttons
Two groups of buttons

Properties

type

type:"Grid"


items

items: (UIButtonElement |UITextElement |UIDividerElement |UITextInputElement |UISelectElement |UIFlexibleSpaceElement |UIButtonRowElement |UICheckboxGroupElement |UIRadioGroupElement |UIToggleGroupElement |UIIframeElement)[]

The items to add to the grid container.


id

id:string

The ID of the element.


grid?

optionalgrid:string

The grid to use for the container. It is the exact same as CSS's shorthand propertygrid.

Example

horizontal stack

two columns, the first column is 50px wide, the second column takes the remaining space

See

https://developer.mozilla.org/en-US/docs/Web/CSS/grid for more details.


verticalAlignment?

optionalverticalAlignment:"center" |"top" |"bottom"

The alignment of the items in the grid. Only takes effect on horizontal stacks.

Default Value

"top"


horizontalDistribution?

optionalhorizontalDistribution:"center" |"start" |"end" |"space-between" |"space-around" |"space-evenly"

The distribution of the items in the grid. Only takes effect on horizontal stacks.

Default Value

"start"


onCreate()?

optionalonCreate: (args: {id:string; }) =>void

A function to call when the element is created.

Parameters

Parameter
Type
Description

args

{id:string; }

The arguments passed to the function.

args.id

string

The id of the element.

Returns

void


onDestroy()?

optionalonDestroy: (args: {id:string; }) =>void

A function to call when the element is destroyed.

Parameters

Parameter
Type
Description

args

{id:string; }

The arguments passed to the function.

args.id

string

The id of the element.

Returns

void

Last updated

Was this helpful?


[8]ページ先頭

©2009-2025 Movatter.jp