GhostBlock
A component used to build out a loading state for other components or layouts
Default
By default, the GhostBlock is a fixed-height fluid-width component that fills the container it's in on the horizontal axis:
Editable example
In a layout
You can use multiple GhostBlock instances to create a layout or component that looks similar to an existing component without the content:
Editable example
Best practices
- Use a GhostBlock when the loaded content will approximately fill the same container as the GhostBlock's layout, to reduce jank and vertical flicker; for other cases (e.g. where vertical height or layout is unpredictable) use a Spinner.