react-skeleton-content

react skeleton

Usage no npm install needed!

<script type="module">
  import reactSkeletonContent from 'https://cdn.skypack.dev/react-skeleton-content';
</script>

README

Index

Getting Started

npm i react-skeleton-content --save
yarn add react-skeleton-content

Usage

1. SkeletonDisplayTitle:

import React from 'react'
import { SkeletonDisplayTitle } from 'react-skeleton-content'

class Component extends React.Component {

  render() {
    return <SkeletonDisplayTitle />
  }
}
Options

size?: string

Defaults to small (small, medium, large)

Still not clear? Take a look at this working example at codesandbox.io

2. SkeletonBodyText:

import React from 'react'
import { SkeletonBodyText } from 'react-skeleton-content'

class Component extends React.Component {

  render() {
    return <SkeletonBodyText />
  }
}
Options

lines?: number

Defaults to 3.

Still not clear? Take a look at this working example at codesandbox.io

3. SkeletonThumbnail:

import React from 'react'
import { SkeletonThumbnail } from 'react-skeleton-content'

class Component extends React.Component {

  render() {
    return <SkeletonThumbnail />
  }
}
Options

size?: string

Defaults to small (small, medium, large)

round?: boolean

Defaults to false.

Still not clear? Take a look at this working example at codesandbox.io