@cleartrip/ct-design-lottie-player
v5.18.0
Published
LottiePlayer Component
Maintainers
Keywords
Readme
LottiePlayer
A component for playing Lottie animations.
Installation
npm install @cleartrip/ct-design-lottie-player
# or
pnpm add @cleartrip/ct-design-lottie-playerPeer dependencies
# Required for all targets
npm install react
# Web only
npm install react-dom
# React Native only
npm install react-nativeUsage
Basic
import { LottiePlayer } from '@cleartrip/ct-design-lottie-player';
function Example() {
return (
<LottiePlayer>
{/* Basic usage */}
</LottiePlayer>
);
}Accessibility
- The component follows accessibility best practices
- Ensure proper ARIA attributes are provided where needed
- Test with screen readers to ensure usability
Migration
If migrating from a previous version:
- import { LottiePlayer } from 'yagami/core/components';
+ import { LottiePlayer } from '@cleartrip/ct-design-lottie-player';