Skeleton
A UI element that displays the outline of elements to appear while content is loading, making the loading time feel shorter.
@seed-design/lynx-react@0.8.0, @seed-design/lynx-css@0.12.0
import "./styles";
import { Skeleton, useSeedClassName, VStack } from "@seed-design/lynx-react";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
<view className={`${seedClassName} docs-lynx-skeleton-root`}>
<view className="skeleton-preview">
<VStack gap="x4" align="center">
<Skeleton radius="full" width="48px" height="48px" />
<VStack gap="x2">
<Skeleton radius="8" width="250px" height="16px" />
<Skeleton radius="8" width="250px" height="16px" />
</VStack>
</VStack>
</view>
</view>
);
}
npm install @seed-design/lynx-react @seed-design/lynx-css
pnpm add @seed-design/lynx-react @seed-design/lynx-css
yarn add @seed-design/lynx-react @seed-design/lynx-css
bun add @seed-design/lynx-react @seed-design/lynx-css
import { Skeleton } from "@seed-design/lynx-react";
style?CSSProperties | undefined
className?string | undefined
width?"full" | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefined
height?"full" | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | undefined
import "./styles";
import { HStack, Skeleton, useSeedClassName } from "@seed-design/lynx-react";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
<view className={`${seedClassName} docs-lynx-skeleton-root`}>
<view className="skeleton-preview">
<HStack gap="x4" align="center">
<Skeleton radius="0" width="48px" height="48px" />
<Skeleton radius="8" width="48px" height="48px" />
<Skeleton radius="16" width="48px" height="48px" />
<Skeleton radius="full" width="48px" height="48px" />
</HStack>
</view>
</view>
);
}
import "./styles";
import { Skeleton, useSeedClassName, VStack } from "@seed-design/lynx-react";
export default function Example() {
const seedClassName = useSeedClassName({ colorMode: "system" });
return (
<view className={`${seedClassName} docs-lynx-skeleton-root`}>
<view className="skeleton-preview">
<VStack gap="x4" align="flex-start" width="full">
<Skeleton tone="neutral" radius="16" width="full" height="48px" />
<Skeleton tone="magic" radius="16" width="full" height="48px" />
</VStack>
</view>
</view>
);
}
- The web renders shimmer with HTML
<div> and CSS pseudo-element, while Lynx renders a native <view> root and shimmer child.
- Lynx treats Skeleton as a decorative element and hides the root and shimmer child from the accessibility tree with
accessibility-elements-hidden.
- The Lynx public API provides
radius, tone, width, height, className, style, and root <view> ref, but does not provide children, events, or state APIs.