Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shayan-mirzaie/skeleton-react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shayan-mirzaie/skeleton-react

easy to use library for skeleton loading.

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Skeleton React

easy to use library for skeleton loading.



coming soon

  • new components
  • several animation mode
  • global colour and size registry
  • dark mode
  • vue.js implementation
  • react native implementation

installation

Using npm:

$ npm i @shayan-mirzaie/skeleton-react

Using yarn:

$ yarn add @shayan-mirzaie/skeleton-react

Usage

simply import the package

import Skeleton from "@shayan-mirzaie/skeleton-react";

then use <Skeleton> component to see the result :

<Skeleton>
    <Skeleton.Circle />
    <Skeleton.Rect />
    <Skeleton.Rect width="75%" />
</Skeleton>

Api

namedescriptionpropschildren
Skeletonwrapper component of libraryenable boolean
dir rtl|ltr
YES
Skeleton.Rectshow rectangle shapeheight string ex: 20px
width string ex: 20px
margin string ex: 20px
full boolean
onClick callback function
Skeleton.Squareshow square shapewidth string ex: 20px
margin string ex: 20px
onClick callback function
Skeleton.Circleshow circle shaperadius string ex: 20px
margin string ex: 20px
onClick callback function
Skeleton.Rowshow children item in a rowalignItems center|start|end|baseline
justifyContent center|start|end|space-around|space-between
onClick callback function
YES
Skeleton.Colshow children item in a columnalignItems center|start|end|baseline
justifyContent center|start|end|space-around|space-between
onClick callback function
YES
Skeleton.Centershow children item centeronClick callback functionYES
Skeleton.Listiterate children item to show a listcount numberYES

Examples

  • post view
<Skeleton>
    <Skeleton.Row alignItems="center" justifyContent="space-between">
        <Skeleton.Circle radius="40px" />
        <Skeleton.Rect width="70px" height="20px" />
    </Skeleton.Row>
    <Skeleton.Rect height="220px" />
</Skeleton>
  • list view
<Skeleton>
    <Skeleton.List count={4}>
        <Skeleton.Row>
            <Skeleton.Circle />
            <Skeleton.Col>
                <Skeleton.Rect />
                <Skeleton.Rect width="50%" />
            </Skeleton.Col>
        </Skeleton.Row>
    </Skeleton.List>
</Skeleton>

Keywords

FAQs

Package last updated on 12 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc