UIGridContainerElementUpdate
The parameters for updating a grid container element.
See UIGridContainerElement for more details.
Remarks
id and type are required to identify the element to update.
Properties
type
type:
"Grid"
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 property grid.
Example
horizontal stack
two columns, the first column is 50px wide, the second column takes the remaining space
{
type: "Grid",
grid: "auto-flow / 50px 1fr",
items: [...]
}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"
items?
optionalitems: (UIButtonElementCreate|UITextElementCreate|UIDividerElementCreate|UITextInputElementCreate|UISelectElementCreate|UIFlexibleSpaceElementCreate|UIButtonRowElementCreate|UICheckboxGroupElementCreate|UIRadioGroupElementCreate|UIToggleGroupElementCreate|UIIframeElementCreate)[]
The items to add to the grid container.
onCreate()?
optionalonCreate: (args: {id:string; }) =>void
A function to call when the element is created.
Parameters
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
args
{ id: string; }
The arguments passed to the function.
args.id
string
The id of the element.
Returns
void
Last updated
Was this helpful?