Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@s-ui/react-atom-skeleton
Advanced tools
Display the loading state of a component while avoding layout shift
Readme
Skeleton is used to display the loading state of a component while avoiding layout shift.
$ npm install @s-ui/react-atom-skeleton
import AtomSkeleton from '@s-ui/react-atom-skeleton'
return (<AtomSkeleton />)
@import '~@s-ui/theme/lib/index';
@import '~@s-ui/react-atom-skeleton/lib/index';
Use variant
prop to shape the skeleton and make it look like the final user interface. Choose between round
, square
and circle
.
import AtomSkeleton, {ATOM_SKELETON_VARIANTS} from '@s-ui/react-atom-skeleton'
const VariantStory = () => (
<>
<AtomSkeleton variant={ATOM_SKELETON_VARIANTS.circle} />
<AtomSkeleton variant={ATOM_SKELETON_VARIANTS.round} />
<AtomSkeleton variant={ATOM_SKELETON_VARIANTS.square} />
</>
);
While the width
and height
props could be set, it was made to be used directly in your components.
import AtomSkeleton from '@s-ui/react-atom-skeleton'
const SizeStory = () => (
<>
<AtomSkeleton height="16px" />
<h2>
<AtomSkeleton />
</h2>
</>
);
Use animation
prop to choose between wave
and pulse
animation, if the prop is set to false
the component won't have any.
import AtomSkeleton, {ATOM_SKELETON_ANIMATIONS} from '@s-ui/react-atom-skeleton'
const AnimationStory = () => (
<>
<AtomSkeleton animation={ATOM_SKELETON_ANIMATIONS.wave} />
<AtomSkeleton animation={ATOM_SKELETON_ANIMATIONS.pulse} />
<AtomSkeleton animation={false} />
</>
);
Use count
prop to display several skeletons
const CountStory = () => (
<>
<AtomSkeleton count={4} />
</>
);
Find full description and more examples in the demo page.
FAQs
Display the loading state of a component while avoding layout shift
The npm package @s-ui/react-atom-skeleton receives a total of 2,682 weekly downloads. As such, @s-ui/react-atom-skeleton popularity was classified as popular.
We found that @s-ui/react-atom-skeleton demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.