cocos_stack_vertically
Arrange UI elements vertically in Cocos Creator scenes to organize components top-to-bottom with configurable spacing, padding, and alignment options.
Instructions
cc.Layout type=VERTICAL — children arrange top-to-bottom.
spacing / padding accept a design-token name
(xs/sm/md/lg/xl) or a raw int in logical
pixels. align: left/center/right.
Returns the Layout component id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene_path": "<scene_path>",
"node_id": "<node_id>"
},
"name": "cocos_stack_vertically"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| spacing | No | md | |
| padding | No | lg | |
| align | No | center |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |