diff --git a/packages/docs/docs/flex/props.mdx b/packages/docs/docs/flex/props.mdx index 219a025a..028eece6 100644 --- a/packages/docs/docs/flex/props.mdx +++ b/packages/docs/docs/flex/props.mdx @@ -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. ::: @@ -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 - -
- Type definitions - -```tsx -type LayoutTransition = - | BaseAnimationBuilder - | LayoutAnimationFunction - | typeof BaseAnimationBuilder; -``` - -
- -:::warning Warning (Web) - -This prop is **not supported** on Web. - -::: - --- -### itemsLayoutTransitionMode +### itemPositionsAnimationMode Controls when items positions are animated. diff --git a/packages/docs/docs/grid/props.mdx b/packages/docs/docs/grid/props.mdx index 6388e191..208de7d4 100644 --- a/packages/docs/docs/grid/props.mdx +++ b/packages/docs/docs/grid/props.mdx @@ -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. ::: @@ -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 - -
- Type definitions - -```tsx -type LayoutTransition = - | BaseAnimationBuilder - | LayoutAnimationFunction - | typeof BaseAnimationBuilder; -``` - -
- -:::warning Warning (Web) - -This prop is **not supported** on Web. - -::: - --- -### itemsLayoutTransitionMode +### itemPositionsAnimationMode Controls when items positions are animated.