Have lottie player use the intrinsic dimensions of the animation

Hello, I’m rendering the react lottie component like this:

<DotLottieReact
  src={mediaFile.url}
  autoplay={false}
  loop={false}
  dotLottieRefCallback={dotLottieRefCallback}
/>

With the same src file, the width of the rendered canvas is set to different values, depending on the size of the parent container. Is there any way of setting the canvas size to the intrinsic dimensions of the animation, similar to how a video or image behaves?

Hello,

Expect consistent sizing behavior similar to how images or videos respect their intrinsic dimensions. The issue you’re seeing with comes from how Lottie animations are styled by default — they typically scale to fill the container unless explicitly constrained.

Best Regard,
Brian