Theming
How to use theming with the player-component
1. Creating a dotLottie with themes using dotlottie-js
Full dotlottie-js theming documentation is avalaible here.
After installing dotlottie-js you can create and assign themes to animations: const dotlottie = new DotLottie();
The result is a .lottie
file containing a themes
folder and a .lss
file containing your theme data.
2. Finding the theme names inside your .lottie
You can then save the themes or just use the ids directly outputted.
3. Using the player-component with themes
Using the 'defaultTheme' prop
Using the defaultTheme
prop will assign the theme to the first loaded animation.
Using the 'setTheme' method
You can manually set and change the active theme applied to your animation using the setTheme(theme: string)
method:
Last updated