UIGridContainerElementCreate
Last updated
Was this helpful?
The parameters for creating a grid container element.
See UIGridContainerElement for more details.
type:
"Grid"
items: (
UIButtonElementCreate|UITextElementCreate|UIDividerElementCreate|UITextInputElementCreate|UISelectElementCreate|UIFlexibleSpaceElementCreate|UIButtonRowElementCreate|UICheckboxGroupElementCreate|UIRadioGroupElementCreate|UIToggleGroupElementCreate|UIIframeElementCreate)[]
The items to add to the grid container.
optionalgrid:string
The grid to use for the container. It is the exact same as CSS's shorthand property grid.
two columns, the first column is 50px wide, the second column takes the remaining space
https://developer.mozilla.org/en-US/docs/Web/CSS/grid for more details.
optionalverticalAlignment:"center"|"top"|"bottom"
The alignment of the items in the grid. Only takes effect on horizontal stacks.
"top"
optionalhorizontalDistribution:"center"|"start"|"end"|"space-between"|"space-around"|"space-evenly"
The distribution of the items in the grid. Only takes effect on horizontal stacks.
"start"
optionalonCreate: (args: {id:string; }) =>void
A function to call when the element is created.
args
{ id: string; }
The arguments passed to the function.
args.id
string
The id of the element.
void
optionalonDestroy: (args: {id:string; }) =>void
A function to call when the element is destroyed.
args
{ id: string; }
The arguments passed to the function.
args.id
string
The id of the element.
void
optionalid:string
The ID of the element.
If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.
If provided, it must be unique within the UI.
undefined
Last updated
Was this helpful?
Was this helpful?
{
type: "Grid",
grid: "auto-flow / 50px 1fr",
items: [...]
}