Skip to content

v3.1.0

Latest

Choose a tag to compare

@Gamote Gamote released this 16 Aug 20:56
c60f6a7

New

  • configureLottie sets the two things that belong to the engine rather than to one animation: idPrefix and quality. Element IDs are prefixed by default from this version, lottie-react-lottie__lottie_element_1 where 3.0.0 minted __lottie_element_1, each engine build with its own suffix, so Lottie and LottieLight on one page no longer share an ID; two copies of the library each set a base of their own. Docs: https://lottiereact.com/docs/animation/configuring-the-engine
  • React Server Components: the components, the hooks, the interaction factories and configureLottie are marked as client modules, so a server component can import <Lottie> directly; a server-side call of configureLottie fails at build time instead of configuring a copy the browser never sees.
  • rendererSettings types now include the fields the engine reads that lottie-web's own declarations leave out: runExpressions on every renderer, id and contentVisibility on svg and canvas, width and height on svg, filterSize on html.

Fixed

  • lottieScrollScrub no longer stands still when html, body { overflow-x: hidden } (a common rule, and create-next-app's default) makes body a scroll container that never scrolls: the scrub measures by hand whenever its timeline's scroller cannot scroll.
  • Interaction factories receive a live view of the animation from context.lottie, so keeping or destructuring it is safe; a copy taken at attach time no longer misses a root that arrives later.

Docs

Cursor-follow and recolouring recipes, and clarifications on server rendering, the reported frame after playSegments, and the migration guide.

Nothing breaking: the peer range, the exports and every existing prop are unchanged.