react-spinner

React Spinner Component

View on GitHub

Home > @gregoranders/react-spinner > Spinner

Spinner variable

Spinner/Loader React component.

Signature:

Spinner: {
    (properties: Props): JSX.Element;
    displayName: string;
    defaultProps: {
        readonly className: "spinner";
        readonly indicator: "·";
        readonly max: 7;
        readonly timeout: 500;
    };
    propTypes: {
        className: import("prop-types").Requireable<string>;
        indicator: import("prop-types").Requireable<string>;
        max: import("prop-types").Requireable<number>;
        timeout: import("prop-types").Requireable<number>;
    };
}

Example

import React, { Suspense } from 'react';
import Spinner from '@gregoranders/react-spinner';

export const App = () => {
  return (
    <Suspense fallback={<Spinner />}>
      ...
    </Suspense>
  );
};