Control how a Layout arranges its children with direction, alignment, padding, and gap.
A Layout arranges the children that participate in it. This page covers the settings you set on the parent: which direction its children flow, how they wrap and align, how much space surrounds and separates them, and how the Layout itself looks.Apart from clip and styles, these settings only affect children that participate in the Layout: other Layouts, shapes, text, and images set to Layout in the Inspector, and component instances in Layout mode. Absolute children ignore them. To control a child’s own size or pin it to the parent’s edges, see Sizing and Positioning.
The layout type decides the overall pattern a Layout uses to arrange its children:
Row: Places children side by side, from left to right.
Column: Places children one below another, from top to bottom.
Grid: Places children in cells defined by columns and rows. See Grid.
Stack: Places all children in the same space, layered on top of each other. See Stack.
Children are arranged in hierarchy order. To change the order, reorder the children in the Hierarchy or drag them on the stage.To flip the order of a Row or Column without reordering the hierarchy, select the Reverse checkbox. A reversed Row runs from right to left, and a reversed Column runs from bottom to top.The direction a Layout arranges its children in is its main axis. A Row’s main axis is horizontal, and a Column’s is vertical. The other direction is the cross axis. Several settings, including alignment, wrap, and Fill, behave differently along each axis.
Alignment decides where children sit within the Layout when they don’t take up all of its space. Select one of the nine points on the alignment widget in the Inspector, such as top-left or center.Alignment moves children as a group. In a Row aligned to the center, the children stay next to each other and the group sits in the middle of the Row.
To spread children out along the main axis instead, click the selected point again. The first child moves to the start of the Layout, the last child moves to the end, and the remaining space is shared evenly between them. The cross-axis alignment stays the same. Click the point again to group the children back together.
Wrap decides what happens when a Row or Column runs out of room for its children:
No Wrap: Children stay on a single line and extend past the Layout’s edge.
Wrap: Children that don’t fit move onto a new line below a Row, or a new column beside a Column.
Wrap Reverse: Same as Wrap, but new lines are added in the opposite direction, above a Row or before a Column.
Use Wrap for content that should reflow onto more lines as the space gets narrower, such as a set of tags or a gallery of thumbnails. This tutorial builds a file whose elements reflow as it’s resized:
Rive has three settings that add space in a Layout. Padding and gap are set on the parent, and margin is set on the child.
Padding: Space between the parent’s edges and its children. Padding is set on the parent and pushes all of its children inward.
Gap: Space between neighboring children. Gap is set on the parent and applies evenly between every pair of children.
Margin: Space around one child. Margin is set on the child and only affects that child. See Margin.
Prefer gap over margins for even spacing. If every child has a 10-point margin, neighboring children end up 20 points apart, because their margins add together. A 10-point gap puts exactly 10 points between each child and nothing at the edges.
Padding only affects children that participate in the Layout. To add space around a label inside a button, the label needs to participate in the button’s Layout. You can either set the label to Layout in the Inspector, or wrap it in its own Layout.
Padding can be set the same on both sides of an axis, or separately on each edge. Use the edge toggle to show a field for each edge, and use the unit toggle to switch between points and percentages.
Gap can be set separately for the horizontal and vertical directions, in points or as a percentage of the Layout’s width or height. In a Row that wraps, the horizontal gap separates children on the same line, and the vertical gap separates the lines.
Select the clip toggle to hide anything inside the Layout that extends past its edges. Clip applies to all of the Layout’s content, including absolute children and content that doesn’t participate in the Layout.
Layouts can have fills, strokes, feathers, blend modes, and corner radii, just like other objects in Rive. This means a Layout can be the visible shape of a button or card, rather than needing a separate rectangle behind its content.Styles can be drawn in the Background, behind the Layout’s children, or in the Foreground, in front of them. For example, you might place a fill and a feathered shadow behind the children while drawing a stroke in front.Corner radius applies to the Layout’s styles and to its clipping edges, so clipped content follows the rounded corners.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rive","colors":{"primary":"#ffa41c","light":"#ffa41c","dark":"#ffa41c"},"logo":{"light":"https://mintcdn.com/rive/tBktbqSaEr9ZwywZ/logo/rive_top_logo_black.svg?fit=max\u0026auto=format\u0026n=tBktbqSaEr9ZwywZ\u0026q=85\u0026s=e09b8659935986a837947ae7c3b104e0","dark":"https://mintcdn.com/rive/tBktbqSaEr9ZwywZ/logo/rive_top_logo_white.svg?fit=max\u0026auto=format\u0026n=tBktbqSaEr9ZwywZ\u0026q=85\u0026s=d2ccc2c4dec459d584f578475de89248","href":"https://rive.app?utm_source=docs\u0026utm_medium=header_nav"},"favicon":"https://mintcdn.com/rive/IGEy4oJSivuQmjey/favicon_black.png?fit=max\u0026auto=format\u0026n=IGEy4oJSivuQmjey\u0026q=85\u0026s=986c81e5b82e1138420d773296030a3a","appearance":{"default":"dark"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"/tutorials/learn-rive","label":"Learn"},{"href":"/community/support","label":"Support"}],"primary":{"type":"button","label":"Get Rive","href":"https://rive.app/downloads?utm_source=docs\u0026utm_medium=header_nav"}},"footer":{"socials":{"youtube":"https://www.youtube.com/channel/UCPal2R1FxwRTPylhP_7ofEg","x":"https://twitter.com/rive_app","instagram":"https://www.instagram.com/rive.app","github":"https://github.com/rive-app","discord":"https://discord.gg/rive-app"},"links":[{"header":"Resources","items":[{"label":"Community","href":"https://community.rive.app?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Blog","href":"https://rive.app/blog?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Case Studies","href":"https://rive.app/blog/case-studies?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Marketplace","href":"https://rive.app/marketplace?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Feature Requests","href":"https://community.rive.app/c/feature-requests"}]},{"header":"Company","items":[{"label":"Careers","href":"https://rive.app/careers?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Terms of Service","href":"/docs/legal/terms-of-service"},{"label":"Acceptable Use Policy","href":"/docs/legal/acceptable-use-policy"},{"label":"Privacy Policy","href":"/docs/legal/privacy-policy"},{"label":"Your Privacy Choices","href":"https://rive.app/?cookie-settings"}]}]},"fonts":{"heading":{"family":"Tomorrow Placeholder","weight":500,"source":"https://framerusercontent.com/assets/nCpxWS6DaPlPe0lHzStXAPCo3lw.woff2","format":"woff2"}},"integrations":{"amplitude":{"apiKey":"38803036884a752b104ee4bf501e0945"},"cookies":{"key":"rive_analytics","value":"granted"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"variables":{"runtimeCurrentNameApple":"New Runtime","runtimeLegacyNameApple":"Legacy Runtime","monthlyCreditsVoyager":"$20","monthlyCreditsEnterprise":"$40","pricingCadetMonthly":"$17","pricingCadetYearly":"$108","pricingVoyagerMonthly":"$49","pricingVoyagerYearly":"$384","pricingEnterpriseYearly":"$1,440","cliAllowanceFree":"50","cliAllowanceCadet":"500","cliAllowanceVoyager":"5,000","versionWeb":"2.40.1","versionReact":"4.33.0","versionApple":"6.24.0","versionAndroid":"11.9.2","versionReactNative":"0.5.5","versionFlutter":"0.14.11","versionDevFlutter":"0.15.0-dev.4","versionUnity":"0.4.5","versionUnreal":"0.4.25","supportForm":"https://forms.rive.app/support?utm_medium=support_page","supportFormEducational":"https://forms.rive.app/education?utm_medium=support_page"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rive","hasAudioNarration":false,"actualSubdomain":"rive","customDomains":["rive.app"],"gitSource":{"type":"github","owner":"rive-app","repo":"rive-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af3a37d305f0aa45ca045a1","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Runtimes","count":285},{"language":"default","tag":"Scripting","count":190},{"language":"default","tag":"Scripting API","count":169},{"language":"default","tag":"Editor","count":103},{"language":"default","tag":"Fundamentals","count":89},{"language":"default","tag":"GPU","count":45},{"language":"default","tag":"Design","count":37},{"language":"default","tag":"Interfaces","count":26},{"language":"default","tag":"Artboards","count":25},{"language":"default","tag":"React Native","count":20}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"p{font-size:14px}ul li{font-size:14px}ol li{font-size:14px}.signature .code-block{border:none}.signature .code-block [data-floating-buttons=\"true\"]{display:none}.signature .code-block [data-component-part=\"code-block-root\"]{background:none;padding:0}.dark .card{background-color:var(--background-dark)!important;border-color:rgb(255 255 255 / 0.1)!important}.dark .card:hover{border-color:var(--primary-light)!important}"}],"page":{"pagePath":"editor/layouts/arranging-children","slug":"/editor/layouts/arranging-children","pageMetadata":{"title":"Arranging Children","description":"Control how a Layout arranges its children with direction, alignment, padding, and gap.","href":"/editor/layouts/arranging-children"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Control how a Layout arranges its children with direction, alignment, padding, and gap.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const UseCase=({title,children})=>{return _jsxs(`aside`,{class:`callout mint-my-4 mint-px-5 mint-py-4 mint-overflow-hidden mint-rounded-2xl mint-flex mint-gap-3 mint-border mint-border-neutral-200 mint-bg-neutral-50 dark:mint-border-neutral-700 dark:mint-bg-white/10`,\"data-callout-type\":`info`,children:[_jsx(`div`,{class:`mint-mt-0.5 mint-w-4`,\"data-component-part\":`callout-icon`,children:_jsx(`svg`,{width:`11`,height:`14`,viewBox:`0 0 11 14`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,class:`mint-text-neutral-800 dark:mint-text-neutral-300 mint-w-3.5 mint-h-auto`,\"aria-label\":`Tip`,children:_jsx(`path`,{d:`M3.12794 12.4232C3.12794 12.5954 3.1776 12.7634 3.27244 12.907L3.74114 13.6095C3.88471 13.8248 4.21067 14 4.46964 14H6.15606C6.41415 14 6.74017 13.825 6.88373 13.6095L7.3508 12.9073C7.43114 12.7859 7.49705 12.569 7.49705 12.4232L7.50055 11.3513H3.12521L3.12794 12.4232ZM5.31288 0C2.52414 0.00875889 0.5 2.26889 0.5 4.78826C0.5 6.00188 0.949566 7.10829 1.69119 7.95492C2.14321 8.47011 2.84901 9.54727 3.11919 10.4557C3.12005 10.4625 3.12175 10.4698 3.12261 10.4771H7.50342C7.50427 10.4698 7.50598 10.463 7.50684 10.4557C7.77688 9.54727 8.48281 8.47011 8.93484 7.95492C9.67728 7.13181 10.1258 6.02703 10.1258 4.78826C10.1258 2.15486 7.9709 0.000106649 5.31288 0ZM7.94902 7.11267C7.52078 7.60079 6.99082 8.37878 6.6077 9.18794H4.02051C3.63739 8.37878 3.10743 7.60079 2.67947 7.11294C2.11997 6.47551 1.8126 5.63599 1.8126 4.78826C1.8126 3.09829 3.12794 1.31944 5.28827 1.3126C7.2435 1.3126 8.81315 2.88226 8.81315 4.78826C8.81315 5.63599 8.50688 6.47551 7.94902 7.11267ZM4.87534 2.18767C3.66939 2.18767 2.68767 3.16939 2.68767 4.37534C2.68767 4.61719 2.88336 4.81288 3.12521 4.81288C3.36705 4.81288 3.56274 4.61599 3.56274 4.37534C3.56274 3.6515 4.1515 3.06274 4.87534 3.06274C5.11719 3.06274 5.31288 2.86727 5.31288 2.62548C5.31288 2.38369 5.11599 2.18767 4.87534 2.18767Z`})})}),_jsxs(`div`,{class:`mint-text-sm prose dark:prose-invert mint-min-w-0 mint-w-full [\u0026_kbd]:bg-background-light dark:[\u0026_kbd]:bg-background-dark [\u0026_code]:!mint-text-current [\u0026_kbd]:!mint-text-current [\u0026_a]:!mint-text-current [\u0026_a]:mint-border-current [\u0026_strong]:!mint-text-current mint-text-neutral-800 dark:mint-text-neutral-300`,\"data-component-part\":`callout-content`,children:[_jsxs(`strong`,{children:[`Example`,title\u0026\u0026` - ${title}`]}),children]})]})};const YouTube=({id,timestamp})=>{const videoSrc=timestamp?`https://www.youtube.com/embed/${id}?start=${timestamp}`:`https://www.youtube.com/embed/${id}`;return _jsx(`iframe`,{width:`100%`,height:`400`,src:videoSrc,title:`YouTube video player`,frameBorder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,referrerPolicy:`strict-origin-when-cross-origin`,allowFullScreen:true})};function _createMdxContent(props){const _components={a:`a`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,OptimizedImage,Tip,_MdxComponentBoundary}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`A Layout arranges the children that participate in it. This page covers the settings you set on the parent: which direction its children flow, how they wrap and align, how much space surrounds and separates them, and how the Layout itself looks.`}),`\n`,_jsxs(_components.p,{children:[`Apart from clip and styles, these settings only affect children that participate in the Layout: other Layouts, shapes, text, and images set to `,_jsx(_components.strong,{children:`Layout`}),` in the `,_jsx(_components.strong,{children:`Inspector`}),`, and component instances in `,_jsx(_components.strong,{children:`Layout`}),` mode. Absolute children ignore them. To control a child’s own size or pin it to the parent’s edges, see `,_jsx(_components.a,{href:`/editor/layouts/sizing-and-positioning`,children:`Sizing and Positioning`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`layout-type`,children:`Layout type`}),`\n`,_jsx(_components.p,{children:`The layout type decides the overall pattern a Layout uses to arrange its children:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Row:`}),` Places children side by side, from left to right.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Column:`}),` Places children one below another, from top to bottom.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Grid:`}),` Places children in cells defined by columns and rows. See `,_jsx(_components.a,{href:`/editor/layouts/grid-and-stack#grid`,children:`Grid`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stack:`}),` Places all children in the same space, layered on top of each other. See `,_jsx(_components.a,{href:`/editor/layouts/grid-and-stack#stack`,children:`Stack`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Children are arranged in hierarchy order. To change the order, reorder the children in the `,_jsx(_components.strong,{children:`Hierarchy`}),` or drag them on the stage.`]}),`\n`,_jsxs(_components.p,{children:[`To flip the order of a Row or Column without reordering the hierarchy, select the `,_jsx(_components.strong,{children:`Reverse`}),` checkbox. A reversed Row runs from right to left, and a reversed Column runs from bottom to top.`]}),`\n`,_jsxs(_components.p,{children:[`The direction a Layout arranges its children in is its `,_jsx(_components.strong,{children:`main axis`}),`. A Row’s main axis is horizontal, and a Column’s is vertical. The other direction is the `,_jsx(_components.strong,{children:`cross axis`}),`. Several settings, including alignment, wrap, and `,_jsx(_components.a,{href:`/editor/layouts/sizing-and-positioning#fill`,children:`Fill`}),`, behave differently along each axis.`]}),`\n`,_jsx(Heading,{level:`2`,id:`alignment`,children:`Alignment`}),`\n`,_jsxs(_components.p,{children:[`Alignment decides where children sit within the Layout when they don’t take up all of its space. Select one of the nine points on the alignment widget in the `,_jsx(_components.strong,{children:`Inspector`}),`, such as top-left or center.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=f6a7826fcb53bf99753a031aaecf3e3e`,alt:`Alignment widget in the Layout inspector with content aligned to the top-left`,\"data-og-width\":`1280`,width:`1280`,\"data-og-height\":`720`,height:`720`,\"data-path\":`images/editor/layouts/alignment-widget.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?w=280\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=a3b83dd5a828f780a8953460204fa4a2 280w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?w=560\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=c44f3eea5f11d085cfe960ad7ccc30bd 560w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?w=840\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=efe318aef02a9e11bb41e2d8c1e23e54 840w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=c2a7cb5c3188b3389a9743fceeaebeea 1100w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=61efb907935bdd86f4a9c4f503bfb9b5 1650w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/alignment-widget.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=dee57e6140a26640a118405cd85af410 2500w`}),`\n`,_jsx(_components.p,{children:`Alignment moves children as a group. In a Row aligned to the center, the children stay next to each other and the group sits in the middle of the Row.`}),`\n`,_jsx(Heading,{level:`3`,id:`space-between`,children:`Space between`}),`\n`,_jsx(_components.p,{children:`To spread children out along the main axis instead, click the selected point again. The first child moves to the start of the Layout, the last child moves to the end, and the remaining space is shared evenly between them. The cross-axis alignment stays the same. Click the point again to group the children back together.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/justify-fill.gif?s=fbb6e75aa880b7092242d2316c541ec0`,alt:`Clicking the active alignment tile in the Layout inspector to spread children across the available space`,\"data-og-width\":`800`,width:`800`,\"data-og-height\":`450`,height:`450`,\"data-path\":`images/editor/layouts/justify-fill.gif`,\"data-optimize\":`true`,\"data-opv\":`3`}),`\n`,_jsx(_MdxComponentBoundary,{name:`UseCase`,children:_jsx(UseCase,{title:`A navigation bar`,children:_jsx(_components.p,{children:`A navigation bar is a Row containing a logo, a set of links, and a profile button. With space between, the logo sits at the left edge, the profile button at the right edge, and the links in the middle. When the bar gets wider, the space between them grows while each item stays the same size.`})})}),`\n`,_jsx(Heading,{level:`2`,id:`wrap`,children:`Wrap`}),`\n`,_jsx(_components.p,{children:`Wrap decides what happens when a Row or Column runs out of room for its children:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No Wrap:`}),` Children stay on a single line and extend past the Layout’s edge.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Wrap:`}),` Children that don’t fit move onto a new line below a Row, or a new column beside a Column.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Wrap Reverse:`}),` Same as `,_jsx(_components.strong,{children:`Wrap`}),`, but new lines are added in the opposite direction, above a Row or before a Column.`]}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=a2383b6bde0f18f364fec0aa672fddb7`,alt:`Layout inspector with the wrap dropdown set to No Wrap highlighted`,\"data-og-width\":`1280`,width:`1280`,\"data-og-height\":`720`,height:`720`,\"data-path\":`images/editor/layouts/wrap-dropdown.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?w=280\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=ca8c7bc9a2da89b22d85906fa19dcffb 280w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?w=560\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=d279ff3181fad0930e9cec8154bf4246 560w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?w=840\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=3851e0fed8eb242d4979978d26a89b54 840w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=8c6c684af53058e1cb2cddb0cb58a58c 1100w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=244df1e22e4b726bb46dc7267045bb3a 1650w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/wrap-dropdown.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=dfe1d96da59468b15f75e005f6c44f00 2500w`}),`\n`,_jsx(_components.p,{children:`Use Wrap for content that should reflow onto more lines as the space gets narrower, such as a set of tags or a gallery of thumbnails. This tutorial builds a file whose elements reflow as it’s resized:`}),`\n`,_jsx(_MdxComponentBoundary,{name:`YouTube`,children:_jsx(YouTube,{id:`_dE4ndRZB6U`})}),`\n`,_jsx(Heading,{level:`2`,id:`padding-gap-and-margin`,children:`Padding, gap, and margin`}),`\n`,_jsx(_components.p,{children:`Rive has three settings that add space in a Layout. Padding and gap are set on the parent, and margin is set on the child.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Padding:`}),` Space between the parent’s edges and its children. Padding is set on the parent and pushes all of its children inward.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Gap:`}),` Space between neighboring children. Gap is set on the parent and applies evenly between every pair of children.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Margin:`}),` Space around one child. Margin is set on the child and only affects that child. See `,_jsx(_components.a,{href:`/editor/layouts/sizing-and-positioning#margin`,children:`Margin`}),`.`]}),`\n`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`UseCase`,children:_jsx(UseCase,{title:`Spacing out a list`,children:_jsx(_components.p,{children:`A Column contains three list items. To keep the items 24 points from the Column’s edges, add 24 points of padding to the Column. To put 12 points between each item, set the Column’s vertical gap to 12. To give one item extra space above it, such as the start of a new section, add a top margin to that item only.`})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Prefer gap over margins for even spacing. If every child has a 10-point margin, neighboring children end up 20 points apart, because their margins add together. A 10-point gap puts exactly 10 points between each child and nothing at the edges.`})}),`\n`,_jsxs(_components.p,{children:[`Padding only affects children that participate in the Layout. To add space around a label inside a button, the label needs to participate in the button’s Layout. You can either set the label to `,_jsx(_components.strong,{children:`Layout`}),` in the `,_jsx(_components.strong,{children:`Inspector`}),`, or wrap it in its own Layout.`]}),`\n`,_jsx(Heading,{level:`3`,id:`setting-padding`,children:`Setting padding`}),`\n`,_jsx(_components.p,{children:`Padding can be set the same on both sides of an axis, or separately on each edge. Use the edge toggle to show a field for each edge, and use the unit toggle to switch between points and percentages.`}),`\n`,_jsxs(`video`,{width:`640`,controls:true,children:[_jsx(`source`,{src:`https://ucarecdn.com/a489bd85-d55b-424b-8f7a-1a1a7aab37f6/`,type:`video/mp4`}),_jsx(_components.p,{children:`Padding and Margin`})]}),`\n`,_jsx(Heading,{level:`3`,id:`setting-gap`,children:`Setting gap`}),`\n`,_jsx(_components.p,{children:`Gap can be set separately for the horizontal and vertical directions, in points or as a percentage of the Layout’s width or height. In a Row that wraps, the horizontal gap separates children on the same line, and the vertical gap separates the lines.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=5d8e9ba87cf9fe03fff23b5f15030f83`,alt:`Horizontal and vertical gap fields set to 16 px highlighted in the Layout inspector`,\"data-og-width\":`1280`,width:`1280`,\"data-og-height\":`720`,height:`720`,\"data-path\":`images/editor/layouts/gap-fields.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?w=280\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=eb4454f0a274ea75647368f2402b7a70 280w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?w=560\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=020f72b2b4498bf31eaf384e331050a0 560w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?w=840\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=0f9f0e8ead19efbba299c5cb08265620 840w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=9fb373fec3d7a3c6195eac01d735115e 1100w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=c7ad07094c6cd05160b33d648a825537 1650w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/gap-fields.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=b404a8f22276b7c2a47af5dbb42857e8 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`text-direction`,children:`Text direction`}),`\n`,_jsx(_components.p,{children:`Text direction decides whether a Layout reads left to right or right to left. Use it to support right-to-left languages such as Arabic and Hebrew.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Inherit:`}),` Use the parent Layout’s direction. This is the default.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Left to Right:`}),` Rows run from left to right, and text aligns to the left.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Right to Left:`}),` Rows run from right to left, and text aligns to the right.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The direction passes down to every child Layout set to `,_jsx(_components.strong,{children:`Inherit`}),`, so you can usually set it once on the artboard or an outer Layout.`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`YouTube`,children:_jsx(YouTube,{id:`oLjFOu-UFxM`})}),`\n`,_jsx(Heading,{level:`2`,id:`clip`,children:`Clip`}),`\n`,_jsx(_components.p,{children:`Select the clip toggle to hide anything inside the Layout that extends past its edges. Clip applies to all of the Layout’s content, including absolute children and content that doesn’t participate in the Layout.`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=377c3b9df261539dcb5f251111c7c4fe`,alt:`Layout inspector with the clip toggle highlighted in the top-right icon group`,\"data-og-width\":`1280`,width:`1280`,\"data-og-height\":`720`,height:`720`,\"data-path\":`images/editor/layouts/clip-toggle.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?w=280\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=22f64271e323593b6bfed876d5a1d76b 280w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?w=560\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=7c6a0ff0917c229bc63aa376c5b60428 560w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?w=840\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=6568b8510c6a5538a37221e6b0050db2 840w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=d38551abd8deb18ab38435bed0f29422 1100w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=a1bb9433d41a48936ba087f40dc0f149 1650w, https://mintcdn.com/rive/T-iiJ8HFcV0AJbfL/images/editor/layouts/clip-toggle.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=T-iiJ8HFcV0AJbfL\u0026q=85\u0026s=97d9dbecc8b0d626d2ca0a7ffdc1ec14 2500w`}),`\n`,_jsx(Heading,{level:`2`,id:`styles`,children:`Styles`}),`\n`,_jsx(_components.p,{children:`Layouts can have fills, strokes, feathers, blend modes, and corner radii, just like other objects in Rive. This means a Layout can be the visible shape of a button or card, rather than needing a separate rectangle behind its content.`}),`\n`,_jsxs(_components.p,{children:[`Styles can be drawn in the `,_jsx(_components.strong,{children:`Background`}),`, behind the Layout’s children, or in the `,_jsx(_components.strong,{children:`Foreground`}),`, in front of them. For example, you might place a fill and a feathered shadow behind the children while drawing a stroke in front.`]}),`\n`,_jsx(_components.p,{children:`Corner radius applies to the Layout’s styles and to its clipping edges, so clipped content follows the rounded corners.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{UseCase,YouTube,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Arranging Children","description":"Control how a Layout arranges its children with direction, alignment, padding, and gap.","href":"/editor/layouts/arranging-children"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[143,2934,")=>null;const YouTube=()=>null;function "]]},"mdxExtracts":{"tableOfContents":[{"title":"Layout type","slug":"layout-type","depth":2,"children":[]},{"title":"Alignment","slug":"alignment","depth":2,"children":[{"title":"Space between","slug":"space-between","depth":3,"children":[]}]},{"title":"Wrap","slug":"wrap","depth":2,"children":[]},{"title":"Padding, gap, and margin","slug":"padding-gap-and-margin","depth":2,"children":[{"title":"Setting padding","slug":"setting-padding","depth":3,"children":[]},{"title":"Setting gap","slug":"setting-gap","depth":3,"children":[]}]},{"title":"Text direction","slug":"text-direction","depth":2,"children":[]},{"title":"Clip","slug":"clip","depth":2,"children":[]},{"title":"Styles","slug":"styles","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/rive/6157a238f0df2356/rive-init.js","/docs/_mintlify/custom/rive/f98a4b1fb6965efa/rive-consent.js"],"dynamicCss":".mint-my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem\n}\n.mint-mt-0\\.5 {\n margin-top: 0.125rem\n}\n.mint-flex {\n display: flex\n}\n.mint-h-auto {\n height: auto\n}\n.mint-w-3\\.5 {\n width: 0.875rem\n}\n.mint-w-4 {\n width: 1rem\n}\n.mint-w-full {\n width: 100%\n}\n.mint-min-w-0 {\n min-width: 0px\n}\n.mint-gap-3 {\n gap: 0.75rem\n}\n.mint-overflow-hidden {\n overflow: hidden\n}\n.mint-rounded-2xl {\n border-radius: 1rem\n}\n.mint-border {\n border-width: 1px\n}\n.mint-border-neutral-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 229 229 / var(--tw-border-opacity, 1))\n}\n.mint-bg-neutral-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(250 250 250 / var(--tw-bg-opacity, 1))\n}\n.mint-px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem\n}\n.mint-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem\n}\n.mint-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n.mint-text-neutral-800 {\n --tw-text-opacity: 1;\n color: rgb(38 38 38 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-border-neutral-700:is(.dark *) {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity, 1))\n}\n.dark\\:mint-bg-white\\/10:is(.dark *) {\n background-color: rgb(255 255 255 / 0.1)\n}\n.dark\\:mint-text-neutral-300:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity, 1))\n}\n.\\[\\\u0026_a\\]\\:mint-border-current a {\n border-color: currentColor\n}\n.\\[\\\u0026_a\\]\\:\\!mint-text-current a {\n color: currentColor !important\n}\n.\\[\\\u0026_code\\]\\:\\!mint-text-current code {\n color: currentColor !important\n}\n.\\[\\\u0026_kbd\\]\\:\\!mint-text-current kbd {\n color: currentColor !important\n}\n.\\[\\\u0026_strong\\]\\:\\!mint-text-current strong {\n color: currentColor !important\n}","subdomain":"rive","siteName":"Rive","title":"Arranging Children - Rive","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-09T21:27:26.659Z","originalFileLocation":"editor/layouts/arranging-children.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Control how a Layout arranges its children with direction, alignment, padding, and gap.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rive\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Arranging Children - Rive\">\u003cmeta data-mint-head property=\"og:description\" content=\"Control how a Layout arranges its children with direction, alignment, padding, and gap.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rive\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://rive.app/docs/editor/layouts/arranging-children\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rive.mintlify.site/docs/_mintlify/api/og/v2?division=Responsive+Design\u0026amp;title=Arranging+Children\u0026amp;description=Control+how+a+Layout+arranges+its+children+with+direction%2C+alignment%2C+padding%2C+and+gap.\u0026amp;theme=2e225578d6f0bf137ea455bc\u0026amp;signature=5bd302ad846e36645cff7931b5c51684f83c2562ded7c4e05305924948e55084\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Arranging Children - Rive\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Control how a Layout arranges its children with direction, alignment, padding, and gap.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rive.mintlify.site/docs/_mintlify/api/og/v2?division=Responsive+Design\u0026amp;title=Arranging+Children\u0026amp;description=Control+how+a+Layout+arranges+its+children+with+direction%2C+alignment%2C+padding%2C+and+gap.\u0026amp;theme=2e225578d6f0bf137ea455bc\u0026amp;signature=5bd302ad846e36645cff7931b5c51684f83c2562ded7c4e05305924948e55084\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rive\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ffa41c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://rive.app/docs/editor/layouts/arranging-children\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/editor/layouts/arranging-children.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://rive.app/#organization\",\"name\":\"Rive\",\"url\":\"https://rive.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rive/tBktbqSaEr9ZwywZ/logo/rive_top_logo_black.svg?fit=max\u0026auto=format\u0026n=tBktbqSaEr9ZwywZ\u0026q=85\u0026s=e09b8659935986a837947ae7c3b104e0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://rive.app/docs#website\",\"name\":\"Rive\",\"url\":\"https://rive.app/docs\",\"publisher\":{\"@id\":\"https://rive.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://rive.app/docs/editor/layouts/arranging-children#webpage\",\"url\":\"https://rive.app/docs/editor/layouts/arranging-children\",\"name\":\"Arranging Children\",\"description\":\"Control how a Layout arranges its children with direction, alignment, padding, and gap.\",\"dateModified\":\"2026-11-09T21:27:26.659Z\",\"isPartOf\":{\"@id\":\"https://rive.app/docs#website\"},\"breadcrumb\":{\"@id\":\"https://rive.app/docs/editor/layouts/arranging-children#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://rive.app/docs/editor/layouts/arranging-children#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Fundamentals\",\"item\":\"https://rive.app/docs/editor/fundamentals/artboards\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Design\",\"item\":\"https://rive.app/docs/editor/fundamentals/artboards\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Responsive Design\",\"item\":\"https://rive.app/docs/editor/layouts/layouts-overview\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Arranging Children\",\"item\":\"https://rive.app/docs/editor/layouts/arranging-children\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://rive.app/docs/editor/layouts/arranging-children#article\",\"headline\":\"Arranging Children\",\"name\":\"Arranging Children\",\"description\":\"Control how a Layout arranges its children with direction, alignment, padding, and gap.\",\"url\":\"https://rive.app/docs/editor/layouts/arranging-children\",\"mainEntityOfPage\":{\"@id\":\"https://rive.app/docs/editor/layouts/arranging-children#webpage\"},\"dateModified\":\"2026-11-09T21:27:26.659Z\",\"publisher\":{\"@id\":\"https://rive.app/#organization\"},\"isPartOf\":{\"@id\":\"https://rive.app/docs#website\"}}]}\u003c/script>","agentPointerHref":"/docs/editor/layouts/arranging-children.md","siteName":"Rive","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/getting-started/introduction"}]},{"tab":"Editor","groups":[{"group":" ","pages":[{"title":"Using the Rive Editor","sidebarTitle":"Get Rive","href":"/editor/get-rive"},{"group":"Editor Interface","pages":[{"title":"Interface Overview","sidebarTitle":"Overview","href":"/editor/interface-overview/overview"},{"title":"File Browser","href":"/editor/interface-overview/file-browser"},{"title":"Viewport","href":"/editor/interface-overview/stage"},{"title":"Toolbar","href":"/editor/interface-overview/toolbar"},{"title":"Design and Animate Modes","href":"/editor/fundamentals/design-vs-animate-mode"},{"title":"Sidebar","href":"/editor/interface-overview/sidebar"},{"title":"Inspector","href":"/editor/interface-overview/inspector"},{"title":"Debug Panel","href":"/editor/interface-overview/debug-panel"},{"title":"Selection and Navigation","href":"/editor/interface-overview/selection-and-navigation"},{"title":"Keyboard Shortcuts","href":"/editor/keyboard-shortcuts"}]}]},{"group":"Fundamentals","pages":[{"group":"Design","pages":[{"title":"Artboards","href":"/editor/fundamentals/artboards"},{"title":"Components","href":"/editor/fundamentals/components"},{"group":"Hierarchy","pages":[{"title":"Hierarchy","sidebarTitle":"Overview","href":"/editor/interface-overview/hierarchy"},{"title":"Groups","href":"/editor/fundamentals/groups"},{"title":"Solos","href":"/editor/manipulating-shapes/solos"},{"title":"Origin","href":"/editor/fundamentals/origin"},{"title":"Animating Draw Order","sidebarTitle":"Custom Draw Order","href":"/editor/animate-mode/animating-draw-order"},{"title":"Tagging","href":"/editor/tagging"}]},{"group":"Drawing","pages":[{"title":"Shapes and Paths","href":"/editor/fundamentals/shapes-and-paths-overview"},{"title":"Fill and Stroke","href":"/editor/fundamentals/fill-and-stroke"},{"title":"Color and Gradients","href":"/editor/fundamentals/color-and-gradients"},{"title":"Shape Tools","href":"/editor/fundamentals/procedural-shapes"},{"title":"Shape Builder","href":"/editor/design/shape-builder"},{"title":"Pen Tool","href":"/editor/fundamentals/pen-tool-overview"},{"title":"Edit Vertices","href":"/editor/fundamentals/edit-vertices"},{"title":"Freehand Drawing with Pencil, Brush, Eraser, and Bucket","sidebarTitle":"Freehand Drawing","href":"/editor/design/freehand-drawing"},{"title":"Shape Bend Tool","href":"/editor/design/shape-bend-tool"},{"title":"Vector Feathering","sidebarTitle":"Feathering (Glows \u0026 Shadows)","href":"/editor/fundamentals/vector-feathering"},{"title":"Trim and Dash","href":"/editor/manipulating-shapes/trim-path"},{"title":"Effect Groups","href":"/editor/manipulating-shapes/effect-groups"},{"title":"Clipping","href":"/editor/manipulating-shapes/clipping"}]},{"title":"Align and Distribute","href":"/editor/fundamentals/align-and-distribute"},{"group":"Text","pages":[{"title":"Text","sidebarTitle":"Overview","href":"/editor/text/text-overview"},{"title":"Text Runs","href":"/editor/text/text-runs"},{"title":"Text Styles","href":"/editor/text/text-styles"},{"title":"Text Modifiers","href":"/editor/text/text-modifiers"},{"title":"Text Input","href":"/editor/text/text-input"}]},{"group":"Responsive Design","pages":[{"title":"Responsive Design","sidebarTitle":"Overview","href":"/editor/layouts/layouts-overview"},{"title":"Creating Layouts","href":"/editor/layouts/layout-tools"},{"title":"Sizing and Positioning","description":"Control how a Layout child sizes itself and where it sits within its parent.","href":"/editor/layouts/sizing-and-positioning"},{"title":"Arranging Children","href":"/editor/layouts/arranging-children"},{"title":"Grid and Stack","description":"Arrange children in columns and rows, or layer them on top of each other.","href":"/editor/layouts/grid-and-stack"},{"title":"Component Sizing","href":"/editor/layouts/component-sizing"},{"title":"Scrolling","href":"/editor/layouts/scrolling"},{"title":"Layout Animation","href":"/editor/layouts/layout-animation"},{"title":"N-Slicing","href":"/editor/layouts/n-slicing"}]},{"title":"Rulers \u0026 Guides","href":"/editor/design/rulers-and-guides"}]},{"group":"Assets","pages":[{"title":"Assets","sidebarTitle":"Overview","href":"/editor/fundamentals/assets-overview"},{"title":"SVG \u0026 Vector Assets","href":"/editor/assets/svg"},{"title":"Photoshop Files","href":"/editor/assets/psd"},{"title":"Font Assets","href":"/editor/text/fonts"},{"title":"Audio Assets","href":"/editor/assets/audio"},{"title":"Libraries","sidebarTitle":"Libraries","href":"/editor/libraries"}]},{"group":"Animation","pages":[{"title":"Animation","sidebarTitle":"Overview","href":"/editor/animate-mode/animate-mode-overview"},{"title":"Timeline","href":"/editor/animate-mode/timeline"},{"title":"Keys","href":"/editor/animate-mode/keys"},{"title":"Interpolation (Easing)","href":"/editor/animate-mode/interpolation-easing"},{"title":"Graph Editor","href":"/editor/animate-mode/graph-editor"}]},{"group":"Rigging \u0026 Control","pages":[{"title":"Rigging Overview","sidebarTitle":"Overview","href":"/editor/manipulating-shapes/manipulating-shapes"},{"title":"Meshes","href":"/editor/manipulating-shapes/meshes"},{"title":"Bones","href":"/editor/manipulating-shapes/bones"},{"title":"Joysticks","href":"/editor/manipulating-shapes/joysticks"},{"group":"Constraints","pages":[{"title":"Constraints Overview","sidebarTitle":"Overview","href":"/editor/constraints/constraints-overview"},{"title":"IK Constraint","href":"/editor/constraints/ik-constraint"},{"title":"Distance Constraint","href":"/editor/constraints/distance-constraint"},{"title":"Scale Constraint","href":"/editor/constraints/scale-constraint"},{"title":"Rotation Constraint","href":"/editor/constraints/rotation-constraint"},{"title":"Transform Constraint","href":"/editor/constraints/transform-constraint"},{"title":"Translation Constraint","href":"/editor/constraints/translation-constraint"},{"title":"Follow Path Constraint","href":"/editor/constraints/follow-path-constraint"},{"title":"Scroll Constraints","href":"/editor/constraints/scroll-constraint"}]}]},{"group":"Interaction","pages":[{"group":"State Machines","pages":[{"title":"State Machine Overview","sidebarTitle":"Overview","href":"/editor/state-machine/state-machine"},{"title":"States","href":"/editor/state-machine/states"},{"title":"Transitions","href":"/editor/state-machine/transitions"}]},{"title":"Listeners","href":"/editor/state-machine/listeners"},{"title":"Actions","href":"/editor/state-machine/actions"},{"group":"Events","pages":[{"title":"Events Overview","sidebarTitle":"Overview","href":"/editor/events/overview"},{"title":"Open URL Events","href":"/editor/events/open-url-events"},{"title":"Audio Events","href":"/editor/events/audio-events"}]}]},{"group":"Data","pages":[{"title":"Data Binding Overview","href":"/editor/data-binding/overview"},{"title":"View Models \u0026 Instances","href":"/editor/data-binding/view-models"},{"title":"View Model Properties","href":"/editor/data-binding/property-types"},{"title":"Binding Data","href":"/editor/data-binding/binding-data"},{"title":"Controlling Data","href":"/editor/data-binding/controlling-data"},{"group":"Advanced Data Binding","pages":[{"title":"Enums","href":"/editor/data-binding/enums"},{"title":"Lists","href":"/editor/data-binding/lists"},{"title":"Converters","href":"/editor/data-binding/converters"},{"title":"Stateful Components","href":"/editor/data-binding/stateful-components"},{"title":"Property Groups","href":"/editor/data-binding/property-groups"},{"title":"Migration Guide","href":"/editor/data-binding/migration-guide"}]}]},{"group":"Publishing","pages":[{"title":"Exporting for Runtime","href":"/editor/exporting/exporting-for-runtime"},{"title":"Sharing \u0026 Embedding","href":"/editor/embed-urls/overview"},{"title":"Exporting Videos \u0026 Images","href":"/editor/exporting/exporting-for-video-and-static-design"},{"title":"Exporting for Backup","href":"/editor/exporting/exporting-for-backup"}]},{"group":"Accessibility","pages":[{"title":"Semantics","href":"/editor/accessibility/semantics"},{"title":"Focus","href":"/editor/accessibility/focus"},{"title":"Reduced Motion","href":"/editor/accessibility/reduced-motion"}]},{"group":"AI","pages":[{"title":"AI Agent vs CLI","sidebarTitle":"AI Agent vs CLI","href":"/editor/ai/agent-vs-cli"},{"title":"AI Agent","href":"/editor/ai-agent/ai-agent"},{"title":"Rive MCP Integration","sidebarTitle":"MCP Integration","href":"/editor/ai/mcp"}]}]},{"group":"Workflows","pages":[{"title":"Performance","href":"/getting-started/best-practices"},{"title":"Dependencies Graph","href":"/editor/workflows/dependency-graph"},{"title":"Revision History","href":"/editor/fundamentals/revision-history"}]}]},{"tab":"Scripting","pages":[{"title":"Scripting","href":"/scripting/getting-started"}]},{"tab":"Runtimes","pages":[{"title":"Runtimes","href":"/runtimes/getting-started"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":" ","pages":[{"title":" ","href":"/tutorials/learn-rive"}]},{"tab":" ","pages":[{"title":" ","href":"/community/support"}]}]},"basePath":"","title":"Arranging Children - Rive","buildId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","deploymentId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-T84NdC3b.js","lightbox-handle-r17bVUz3.js"]}