All Projects → trainline → React Skeletor

trainline / React Skeletor

Licence: other
Skeleton loading for React

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Skeletor

Vue Content Loading
Vue component to easily build (or use presets) SVG loading cards Facebook like.
Stars: ✭ 729 (+32.3%)
Mutual labels:  skeleton, loading
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+1860.8%)
Mutual labels:  skeleton, loading
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (-68.6%)
Mutual labels:  hoc, loading
React Content Loader
⚪ SVG-Powered component to easily create skeleton loadings.
Stars: ✭ 11,830 (+2047.01%)
Mutual labels:  skeleton, loading
react-bones
💀 Dead simple content loading components for React and React-Native. 💀
Stars: ✭ 42 (-92.38%)
Mutual labels:  skeleton, loading
Ngx Skeleton Loader
Make beautiful, animated loading skeletons that automatically adapt to your Angular apps
Stars: ✭ 278 (-49.55%)
Mutual labels:  skeleton, loading
Windless
Windless makes it easy to implement invisible layout loading view.
Stars: ✭ 919 (+66.79%)
Mutual labels:  skeleton, loading
Skeletonloadingview
SkeletonLoadingView(Shimmer) with Kotlin in Android💀💀
Stars: ✭ 146 (-73.5%)
Mutual labels:  skeleton, loading
Tabanimated
A skeleton screen framework based on native for iOS. (一个由iOS原生组件映射出骨架屏的框架,包含快速植入,低耦合,兼容复杂视图等特点,提供国内主流骨架屏动画的加载方案,同时支持上拉加载更多、自定制动画。)
Stars: ✭ 2,909 (+427.95%)
Mutual labels:  skeleton, loading
koleton
The easiest library to show skeleton screens in an Android app.
Stars: ✭ 84 (-84.75%)
Mutual labels:  skeleton, loading
Skeletonui
☠️ Elegant skeleton loading animation in SwiftUI and Combine
Stars: ✭ 275 (-50.09%)
Mutual labels:  skeleton, loading
Godot Gametemplate
Template with all necessary stuff taken care, just create your games main features.
Stars: ✭ 435 (-21.05%)
Mutual labels:  loading
Uiwidget
一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Stars: ✭ 400 (-27.4%)
Mutual labels:  loading
Materialimageloading
Material image loading implementation
Stars: ✭ 396 (-28.13%)
Mutual labels:  loading
Rsloadingview
Awesome loading animations using 3D engine written with Swift
Stars: ✭ 388 (-29.58%)
Mutual labels:  loading
React Adaptive Hooks
Deliver experiences best suited to a user's device and network constraints
Stars: ✭ 4,750 (+762.07%)
Mutual labels:  loading
Bamboots
Bamboots - Extension 4 Alamofire
Stars: ✭ 434 (-21.23%)
Mutual labels:  loading
React Fns
Browser API's turned into declarative React components and HoC's
Stars: ✭ 3,734 (+577.68%)
Mutual labels:  hoc
Ng2 Slim Loading Bar
Angular 2 component shows slim loading bar at the top of the page.
Stars: ✭ 376 (-31.76%)
Mutual labels:  loading
React Top Loading Bar
A very simple, highly customisable youtube-like react loader component.
Stars: ✭ 367 (-33.39%)
Mutual labels:  loading

npm license Travis npm

React Skeletor

React-skeletor gif

Display a skeleton preview of the application's content before the data get loaded.

  • Inject dummy data into the provider
  • Define your loading status with the provider
  • Wrap leaf component with createSkeletorElement and define the style of the component when it is pending. The component will do all the magic for you, it will turn on / off the pending design for you.

Demo

Documentation

Basic usage

  1. Install via npm
npm install @trainline/react-skeletor
  1. Wrap the component (often a container) with the createSkeletonProvider high order component. This adds the loading status and style into the context and inject fake data in the components subtree.
// UserDetailPage.jsx

import { createSkeletonProvider } from '@trainline/react-skeletor';

const UserDetailPage = ({ user }) => (
  <div>
    ...
    <NameCard user={user} />
    ...
  </div>
)

export default createSkeletonProvider(
  // Dummy data with a similar shape to the component's data
  {
    user: {
      firstName: '_____',
      lastName: '________'
    }
  },
  // Predicate that returns true if component is in a loading state
  ({ user }) => user === undefined,
  // Define the placeholder styling for the children elements,
  () => ({
    color: 'grey',
    backgroundColor: 'grey'
  })
)(UserDetailPage);
  1. Use a skeleton element to toggle between the placehoder design and the real content depending on the loading status in the context.
// NameCard.jsx

import { createSkeletonElement } from '@trainline/react-skeletor';

const H1 = createSkeletonElement('h1');
const H2 = createSkeletonElement('h2');

const NameCard = ({ firstName, lastName }) => (
  <div>
    <H1 style={style}>{ firstName }</H1>
    <H2 style={style}>{ lastName }</H2>
  </div>
)

export default NameCard;

Contribute

Before opening any Pull Request please post an issue explaining the problem so that the team can evaluate if the Pull Request is relevant.

Learn more on medium

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].