An open API service indexing awesome lists of open source software.

https://github.com/psparwez/react-hot-spinner


https://github.com/psparwez/react-hot-spinner

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# react-hot-spinner

A customizable spinner component for React applications with TypeScript support.

![](https://via.placeholder.com/640x320.png?text=React+Hot+Spinner)

React Hot Spinner

## Installation

```bash
npm install react-hot-spinner
# or
yarn add react-hot-spinner
```

## Usage

```jsx
import React from 'react';
import { Spinner } from 'react-hot-spinner';

function App() {
return (


Loading Example




);
}

export default App;
```

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `size` | `string \| number` | `'50px'` | Size of the spinner. If a number is provided, it will be treated as pixels. |
| `color` | `white \| black \| string` | `'#f0f0f0'` | Color of the spinner blades. |
| `className` | `string` | `''` | Additional CSS class name(s) to apply to the spinner container. |
| `center` | `boolean` | `false` | Center the spinner in its parent container. |

## Examples

### Basic Usage

```jsx
import { Spinner } from 'react-hot-spinner';

// Default spinner

// Custom size (in pixels)

// Custom size (with CSS units)

// Custom color

// Centered in parent

// With custom class name

// Combining multiple props

```

## Development

```bash
# Install dependencies
npm install

# Build the package
npm run build

# Watch mode
npm run dev

# Run tests
npm test
```

## License

MIT