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

simple-react-skeleton

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-react-skeleton

A simple, fast and easy react skeleton component for your projects.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Simple React Skeleton

npm version

License: MIT

A simple, fast and easy react skeleton component for your projects.

Installation

You can install this package via npm:

npm install simple-react-skeleton

Usage/Examples

<Skeleton propsOrder={["img", "text", "img", "half-text", "profile"]} />

or

<Skeleton dark>
    <SkeletonText lines={2} />
    <SkeletonImage profile />
    <SkeletonText half />
</Skeleton>

Skeleton Props

The Skeleton component accepts the following props:

type AccecptedProps = "img" | "profile" | "text" | "half-text"

propsOrder?: AcceptedProps[]: The order of skeleton props to be displayed.

children?: React.ReactNode: Children elements to be displayed within the skeleton.

outline?: boolean: Whether to display an outline for the skeleton.

style?: React.CSSProperties: Custom CSS styles for the skeleton.

dark?: boolean: If true, the skeleton is rendered in dark mode or light mode by default.

Skeleton Text Props

The SkeletonText component accepts the following props:

lines?: number: The number of lines to be displayed as skeleton text.

half?: boolean: Whether the text width should be half.

<SkeletonText lines={2} /> or <SkeletonText lines={2} half />

Skeleton Image Props

The SkeletonImage component accepts the following props:

profile?: boolean: Whether the image should be displayed as a profile image (circle).

<SkeletonImage /> or <SkeletonImage profile />

Screenshots

App Screenshot

App Screenshot

App Screenshot

App Screenshot

Keywords

FAQs

Package last updated on 16 May 2024

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