Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 12 additions & 37 deletions packages/docs/docs/flex/props.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,22 @@ Horizontal padding of the flex container.

---

### animateHeight
### dimensionsAnimationType

Whether the height of the flex component should be animated when the items are reordered.

| type | default | required |
| --------- | ------- | -------- |
| `boolean` | false | NO |
| type | default | required |
| --------------------------------- | -------- | -------- |
| `'layout' \| 'none' \| 'worklet'` | `'none'` | NO |

:::warning
- `'none'` - No animation
- `'layout'` - uses **Reanimated Layout Animations**
- `'worklet'` - uses **Reanimated worklet-based animations**

This may sometimes cause **performance issues** as it requires layout recalculations.
:::info

- `'layout'` mode is more performant than `'worklet'` but it doesn't affect surrounding views during the animation (surrounding content updates position immediately).
- `'worklet'` mode affects surrounding views but is less performant as it requires layout recalculations on every frame.

:::

Expand Down Expand Up @@ -667,39 +672,9 @@ type LayoutAnimation =

---

### itemsLayout

Layout transition to use when items are reordered.

| type | default | required |
| ------------------ | ----------------------------- | -------- |
| `LayoutTransition` | LinearTransition\* / null\*\* | NO |

\*Library default `itemsLayout` implementation for native platforms

\*\*No default value on Web

<details>
<summary>Type definitions</summary>

```tsx
type LayoutTransition =
| BaseAnimationBuilder
| LayoutAnimationFunction
| typeof BaseAnimationBuilder;
```

</details>

:::warning Warning (Web)

This prop is **not supported** on Web.

:::

---

### itemsLayoutTransitionMode
### itemPositionsAnimationMode

Controls when items positions are animated.

Expand Down
51 changes: 13 additions & 38 deletions packages/docs/docs/grid/props.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,22 @@ Gap between columns in the grid.

---

### animateHeight
### dimensionsAnimationType

Whether the height of the grid should be animated when the items are reordered.
Whether and how to animate container dimensions changes.

| type | default | required |
| --------- | ------- | -------- |
| `boolean` | false | NO |
| type | default | required |
| --------------------------------- | -------- | -------- |
| `'layout' \| 'none' \| 'worklet'` | `'none'` | NO |

:::warning
- `'none'` - No animation
- `'layout'` - uses **Reanimated Layout Animations**
- `'worklet'` - uses **Reanimated worklet-based animations**

This may sometimes cause **performance issues** as it requires layout recalculations.
:::info

- `'layout'` mode is more performant than `'worklet'` but it doesn't affect surrounding views during the animation (surrounding content updates position immediately).
- `'worklet'` mode affects surrounding views but is less performant as it requires layout recalculations on every frame.

:::

Expand Down Expand Up @@ -549,39 +554,9 @@ type LayoutAnimation =

---

### itemsLayout

Layout transition to use when items are reordered.

| type | default | required |
| ------------------ | ----------------------------- | -------- |
| `LayoutTransition` | LinearTransition\* / null\*\* | NO |

\*Used as a default value on native platforms

\*\*No default value on Web

<details>
<summary>Type definitions</summary>

```tsx
type LayoutTransition =
| BaseAnimationBuilder
| LayoutAnimationFunction
| typeof BaseAnimationBuilder;
```

</details>

:::warning Warning (Web)

This prop is **not supported** on Web.

:::

---

### itemsLayoutTransitionMode
### itemPositionsAnimationMode

Controls when items positions are animated.

Expand Down
Loading