You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,7 +279,7 @@ All properties are set in the `animate` prop as flat values (no transform array)
279
279
280
280
`scale` is a shorthand that sets both `scaleX` and `scaleY`. When `scaleX` or `scaleY` is also specified, it overrides the `scale` value for that axis.
281
281
282
-
You can animate any combination of properties simultaneously. All properties share the same transition config.
282
+
You can animate any combination of properties simultaneously. Use a single transition config for all properties, or a [per-property map](#per-property-transitions) for different configs per category.
283
283
284
284
### Looping Animations
285
285
@@ -415,10 +415,11 @@ A `View` that animates property changes using native platform APIs.
|`animate`|`AnimateProps`| Target values for animated properties |
417
417
|`initialAnimate`|`AnimateProps`| Starting values for enter animations (animates to `animate` on mount) |
418
-
|`transition`|`Transition`| Animation configuration (timing, spring, or none) |
418
+
|`transition`|`Transition`| Animation configuration — a single config (timing, spring, or none) or a [per-property map](#per-property-transitions)|
419
419
|`onTransitionEnd`|`(event) => void`| Called when all animations complete with `{ finished: boolean }`|
420
420
|`transformOrigin`|`{ x?: number; y?: number }`| Pivot point for scale/rotation as 0–1 fractions. Default: `{ x: 0.5, y: 0.5 }` (center) |
421
421
|`useHardwareLayer`|`boolean`| Android only — rasterize to GPU texture during animations. See [Hardware Layers](#hardware-layers-android). Default: `false`|
422
+
|`className`|`string`| NativeWind / Tailwind CSS class string. Requires NativeWind in your project. |
| ...rest |`ViewProps`| All other standard View props |
@@ -475,6 +476,18 @@ Properties not specified in `animate` default to their identity values.
475
476
476
477
Applies values instantly with no animation. `onTransitionEnd` fires immediately with `{ finished: true }`.
477
478
479
+
### `TransitionMap`
480
+
481
+
A per-property map that applies different transition configs to different property categories. See [Per-Property Transitions](#per-property-transitions).
Setting `useHardwareLayer` rasterizes the view into a GPU texture for the duration of the animation. This means animated property changes (opacity, scale, rotation) are composited on the RenderThread without redrawing the view hierarchy — useful for complex views with many children.
-`animate` — target values for animated properties
393
394
-`initialAnimate` — starting values (animates to `animate` on mount)
394
-
-`transition` — animation config(timing or spring)
395
+
-`transition` — animation config: a single `SingleTransition`(timing/spring/none) OR a `TransitionMap` with category keys (`default`, `transform`, `opacity`, `borderRadius`, `backgroundColor`)
395
396
-`onTransitionEnd` — callback with `{ finished: boolean }`
396
397
-`transformOrigin` — pivot point as `{ x: 0-1, y: 0-1 }`, default center
-`className` — NativeWind / Tailwind CSS class string (requires NativeWind in the project)
398
400
399
401
### Important Constraints
400
402
401
403
-**Loop requires timing** (not spring) and `initialAnimate` must define the start value
402
-
-**No per-property transitions** — one transition config applies to all animated properties
404
+
-**Per-property transitions supported** — pass a `TransitionMap` with category keys (`default`, `transform`, `opacity`, `borderRadius`, `backgroundColor`) to use different configs per property group
403
405
-**No animation sequencing** — no equivalent to `withSequence`. Simple `withDelay` IS supported via the `delay` transition prop
404
406
-**No gesture/scroll-driven animations** — EaseView is state-driven only
405
407
-**Style/animate conflict** — if a property appears in both `style` and `animate`, the animated value wins
0 commit comments