You can use a composition in many use cases. The following are the most common ones:
In the simplest case, a composition is only used to group several elements in order to e.g. display them together as a pop-up.
- Enhanced Interactions
Interaction options on a page can be significantly increased with compositions. For instance, you can easily use a composition to create a scrollable image gallery on a page. (see video tutorial “Purple DS - Swipe Image Galleries“)
- Nested Animations
Since compositions have their own timeline, complex animations can be implemented with compositions. For instance, this allows for the creation of a flying butterfly that flaps its wings. The butterfly consists of an exterior composition that contains the body of the butterfly and an interior composition with the wings. The butterfly’s flight curve is animated on the outer stage. In the inner composition, the butterfly’s flapping wings are animated. (see video tutorial “Purple DS Composer - Animations with Compositions“)