Agriculture Design System
Beta
Design System for the Export Service

Skeleton

Skeletons are visual placeholders for information while data is still loading.

View in FigmaView in StorybookView in Github
import { ... } from '@ag.ds-next/react/skeleton';

Skeleton components are not read out to screen readers by default, so it is important for you to provide meaningful context for screen reader users.

By using the VisuallyHidden component, we can indicate to screen readers that an element is in a loading state.

Open in Playroom, opens in a new tab
<Card shadow>
	<CardInner>
		<Stack gap={1}>
			<SkeletonHeading type="h3" width="50%" />
			<SkeletonText fontSize="sm" width="25%" />
			<VisuallyHidden>Loading</VisuallyHidden>
		</Stack>
	</CardInner>
</Card>

References