---
title: "Auto layout animated icon"
description: "Auto layout animated icon (Vector editing & design). Three free child objects become an evenly padded row inside their container. Light: each child moves directly into place. Strong: the outer children prepare in opposite directions and the row closes quickly. Reverse restores the free positions."
canonical: https://generativeicons.com/icons/auto-layout/
---

# Auto layout animated icon

Three free child objects become an evenly padded row inside their container. Light: each child moves directly into place. Strong: the outer children prepare in opposite directions and the row closes quickly. Reverse restores the free positions.

- Id: `auto-layout`
- Category: Vector editing & design
- Search terms: flexbox, flex, horizontal stack, hstack, padding, gap, auto spacing, hug contents, responsive layout, even spacing
- Two states: Free layout to Automatic row, played forward and back
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/auto-layout.lottie (dotLottie, 10589 bytes, sha256 63e1ab07ee063836e9086f893631a5a363dd5f5c85924e7a0d9b62bf6ff04386)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add auto-layout
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/auto-layout.mjs';

export function AutoLayoutIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/auto-layout.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/auto-layout/ · https://generativeicons.com/api/icons/auto-layout
