Create skeleton screens that automatically adapt to your app!
Add the new required CSS import:
import 'react-loading-skeleton/dist/skeleton.css'
Read the full list of breaking changes to see if any affect you.
SkeletonTheme
using React context
SkeletonTheme
rendered a <div>
which was undesirable in many
cases. The new SkeletonTheme
does not render any DOM elements.SkeletonTheme
did not work if the Skeleton
was rendered in a
portal. The new SkeletonTheme
does work in this case.SkeletonTheme
: rename the color
prop to baseColor
If you need to support Internet Explorer or use an old version of React, please
continue to use react-loading-skeleton
v2.
SkeletonTheme
direction
prop to support right-to-left animationenableAnimation
prop to allow disabling the animationcontainerClassName
prop to allow customizing the container elementcontainerTestId
to make testing easieraria-live
and aria-busy
attributes to the skeleton container to
improve screen reader supportbackground-position
property which made
the browser repaint the gradient on every frame.transform
of a pseudoelement. This
avoids repaints and results in an observable decrease in CPU usage.width
and height
to be set for the circle
prop to
workduration
from 1.2 s to 1.5 sSkeleton
base color a tiny bit darker so that the
animation is more visiblewidth
propwrapper
prop in the type definitions