1.0.12 • Published 10 years ago

react-loading-spinner v1.0.12

Weekly downloads
316
License
MIT
Repository
github
Last release
10 years ago

React loading spinner

Loading spinner component for React

Installation

npm install -save react-loading-spinner

Usage

Show loading spinner when content is loading and show content when it is loaded.

<Loading isLoading={this.props.isLoadingContent}
         loadingClassName='loading'
         spinner={Spinner}>
  {this.props.content ? (
    <Content />
  ) : null}
</Loading>

You can also assign content as a prop:

<Loading isLoading={this.props.isLoadingContent} children={Content} />

See example

Options

isLoading

It is the state of loading spinner, if true — show spinner, otherwise show content if it is exist.

spinner

Set react component, as a custom spinner. If it is not exist there will be default spinner.

loadingClassName

Style class name for loading wrapper. By default — loadingContiner

children

Assign child component as a property.

License

MIT

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago