Open silvalaura opened 1 year ago
Here's a couple animation demos I tweaked to get to what I think would be ideal animation and color.
Consumers should be able to take three basic shapes (rectangle, rounded, circle) and simulate where real data will appear. They should be able to combine them into all kinds of different layouts and change their dimensions.
Perhaps we should tokenize the colors used in the skeleton so it can be easily changed in a theme, but not have it tied too tightly to the color palette.
The consumer should NOT be able to change the animation.
Question: What is the best implementation strategy? In addition to just shapes that be manipulated into any layout you want, do each of our components also need their own "skeleton state" or something like that?
It is expected for this ticket to have both the new component and examples in the docs site of a fake UI that showcases how this will be used. Once that is built, we will collaborate with Orion to tweak and make all adjustments necessary (in particular around the timing of the animation).
Implementation examples from other design systems:
Using everything above, I think we're ready to figure out the best strategy for implementation.
There have been multiple requests for Magma to provide a way to do skeleton loading.
We should investigate a way to standardize it. Here's a WIP https://codesandbox.io/s/sidebar-loading-animation-o31606?file=/example.tsx. It’s a custom loading state, but inspired by the Animated Progress Bar.