MCPcopy Index your code
hub / github.com/adobe/react-spectrum / SkeletonText

Function SkeletonText

packages/@react-spectrum/s2/src/Skeleton.tsx:118–135  ·  view source on GitHub ↗
({children}: {children: ReactNode})

Source from the content-addressed store, hash-verified

116
117// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.
118export function SkeletonText({children}: {children: ReactNode}): ReactNode {
119 return (
120 <span
121 // @ts-ignore - compatibility with React < 19
122 inert={inertValue(true)}
123 ref={useLoadingAnimation(true)}
124 className={
125 loadingStyle +
126 style({
127 color: 'transparent',
128 boxDecorationBreak: 'clone',
129 borderRadius: 'sm'
130 })
131 }>
132 {children}
133 </span>
134 );
135}
136
137// Clones the child element and displays it with skeleton styling.
138export function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {

Callers

nothing calls this directly

Calls 2

inertValueFunction · 0.90
useLoadingAnimationFunction · 0.85

Tested by

no test coverage detected