Skip to content

Skeleton API

import { Skeleton } from "@stratakit/bricks";
// OR
import Skeleton from "@stratakit/bricks/Skeleton";
Base element: <div>

Represents the loaded content before it finishes loading.

Example:

<Skeleton variant="object" size="small" />
<Skeleton variant="text" size="medium" />
Type: (props: P) => React.ReactNode | React.ReactElement | undefined (optional)

Allows the component to be rendered as a different HTML element or React component. The value can be a React element or a function that takes in the original component props and gives back a React element with the props merged.

Check out the Composition guide for more details.

Type: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined (optional)
Default: "medium"

The size of the skeleton item. Available sizes: xsmall, small, medium, large, xlarge

Type: "object" | "text" | undefined (optional)
Default: "text"

The type of the skeleton item. Available variants: text, object.