0.0.1 • Published 8 months ago
@lottiepro-web/dotlottie-react v0.0.1
@lottiepro-web/dotlottie-react
React components for dotLottie animation format.
Installation
npm install @lottiepro-web/dotlottie-reactUsage
import React from 'react';
import { DotLottiePlayer } from '@lottiepro-web/dotlottie-react';
function App() {
return (
<div>
<DotLottiePlayer
src="path/to/animation.lottie"
style={{ width: 300, height: 300 }}
autoplay
loop
/>
</div>
);
}
export default App;Props
src: Path to the .lottie fileautoplay: Whether to start playing automaticallyloop: Whether to loop the animationspeed: Playback speed (default: 1)theme: Theme to apply (if available)marker: Marker to start from (if available)style: CSS styles for the containerclassName: CSS class name for the container
Features
- React component wrapper for dotLottie
- Full TypeScript support
- All core functionality available
- Easy to use props interface
License
MIT
0.0.1
8 months ago