When to use a Spinner or a custom loading state instead of a Skeleton?
Choose a Spinner when the page is loaded, and a specific request will take over a second and less than five seconds.
Choose a custom loading state with animations, illustrations, or progress bars when the request takes more than five seconds or when the content that will load has an irregular shape, such as a graph.
What to avoid:
Don't show a loading state for requests that take less than a second.
Don't show a Skeleton on a page that is already loaded.
The Skeleton composition should closely resemble the content that will load. For example, pills should represent Tags, rectangles should represent Texts, and circles should represent Avatars.
What should be the size of a Skeleton and its position in a container?
Considering left-to-right interfaces, follow these recommendations:
Position Skeletons so they closely resemble the content that will load. For example, represent Text inside a Card with a set of rectangle Skeletons inside a Card.
If the size or position of the content that will load depends on dynamic conditions, represent a common scenario in the loading state.
Consider that some components already have a loading state that shouldn't be customized, such as the Skeletons in Table columns.
What to avoid:
Don't use large and generic Skeletons. For example, use a set of rectangle Skeletons to represent a Text paragraph, each with a height equal to the line height of the Text that will load.
What type of content should be hidden while a page loads?
Skeletons should replace only the content that will load through requests. For example, the label of a piece of information should remain visible during loading.
What to avoid:
Don't replace actions with Skeletons. Use the disabled state of the component if the action can't be triggered during loading.