# How to change group layout to type stack

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-change-group-layout-to-type-stack/3306>\
**Category:** UXP Plugin API\
**Created:** [July 15, 2021, 7:08pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-change-group-layout-to-type-stack/3306 "2021-07-15T19:08:43Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![DavidXD](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/davidxd/32/909_2.png) [@DavidXD](https://forums.creativeclouddeveloper.com/u/DavidXD)\
**Post date:** [July 21, 2021, 8:00pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-change-group-layout-to-type-stack/3306/6 "2021-07-21T20:00:48Z")

</div>

Please see my response here:

> [@When setting group to Stack layout allow for unspecified spacings](http://forums.creativeclouddeveloper.com/t/when-setting-group-to-stack-layout-allow-for-unspecified-spacings/3326/2):
>
> I spoke with the developer, and it turns out that this is already supported because the layout.stack property is optional. So to set the group’s layout to a horizontal stack without specifying spacings: let layoutStack = { type: SceneNode.LAYOUT\_STACK }; // Defaults to horizontal selectedGroup.layout = layoutStack; To set the group’s layout to a vertical stack without specifying spacings, modify the existing layout property twice: let layoutProperties = selectedGroup.layout; layoutPropertie…

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/how-to-change-group-layout-to-type-stack/3306)._
