React

Skeleton

A UI element that shows the outline of elements that will appear later while content is loading, making the loading time feel shorter.

Available since@seed-design/react@0.0.1, @seed-design/css@0.0.1

Usage

import { Skeleton } from "@seed-design/react";
<Skeleton />

Props

Prop

Type

height?ResponsiveValue<UnwrapResponsive<ResponsiveValue<Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "full" | (string & {})> | undefined> | "lineHeight.t1" | "lineHeight.t2" | "lineHeight.t3" | "lineHeight.t4" | "lineHeight.t5" | "lineHeight.t6" | "lineHeight.t7" | "lineHeight.t8" | "lineHeight.t9" | "lineHeight.t10" | "lineHeight.t11" | "lineHeight.t12" | "lineHeight.t13" | "lineHeight.t14" | "lineHeight.t1Static" | "lineHeight.t2Static" | "lineHeight.t3Static" | "lineHeight.t4Static" | "lineHeight.t5Static" | "lineHeight.t6Static" | "lineHeight.t7Static" | "lineHeight.t8Static" | "lineHeight.t9Static" | "lineHeight.t10Static" | "lineHeight.t11Static" | "lineHeight.t12Static" | "lineHeight.t13Static" | "lineHeight.t14Static">
width?ResponsiveValue<Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "full" | (string & {})> | undefined

Examples

Line Height

For a Skeleton that replaces text, you can specify a line-height token like text using height="lineHeight.t4".

You can also use it for responsive heights.

<Skeleton height={{ base: "lineHeight.t4", md: "lineHeight.t5" }} width="full" />

Radius

Tone

Table of contents