# react-disks

> A shared react component for a stack of rotatable disks containing text

Latest version **1.7.3** (published 2024-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-disks
pnpm add react-disks
yarn add react-disks
bun add react-disks
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.3 |
| Published | 2024-05-05 |
| First published | 2022-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 133.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Madeleine Hill |
| Maintainers | mh11wi |
| Keywords | react, disks, rotate text |

## Links

- npm: https://www.npmjs.com/package/react-disks
- Repository: https://github.com/mh11wi/react-disks
- Homepage: https://github.com/mh11wi/react-disks#readme
- Issues: https://github.com/mh11wi/react-disks/issues
- npm.io page: https://npm.io/package/react-disks

## Dependencies (9)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [react-swipeable](https://npm.io/package/react-swipeable.md) ^7.0.1
- [react-curved-text](https://npm.io/package/react-curved-text.md) ^1.0.0
- [styled-components](https://npm.io/package/styled-components.md) ^5.3.6
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.7.3 (latest) — 2024-05-05
- 1.7.2 — 2024-04-05
- 1.6.1 — 2023-08-08
- 1.5.1 — 2023-03-29
- 1.5.0 — 2023-03-28
- 1.4.0 — 2022-12-09
- 1.3.2 — 2022-12-09
- 1.3.1 — 2022-12-09
- 1.3.0 — 2022-12-08
- 1.2.1 — 2022-11-30
- 1.2.0 — 2022-11-28
- 1.1.1 — 2022-11-28
- 1.1.0 — 2022-11-25
- 1.0.0 — 2022-11-24

## README

# react-disks

A shared react component for a stack of rotatable disks containing text.

If an `m`&times;`n` array of text items is passed to the component, `m` disks will render with `n` items evenly spaced around each disk.

## Installation

```shell
npm install react-disks
```

Please note that dependencies of this package require React **18.0.0** or later.

## Example

```js
import ReactDisks from 'react-disks';

function App() {
  return (
    <ReactDisks
      disksText={[['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l']]}
      onRotate={(rotatedDisksText) => console.log(rotatedDisksText)}
      theme={{main: "magenta", light: "plum", dark: "darkmagenta"}}
      disabled={false}
      swipeMode={false}
      swipeContainer={".someContainer"}
      darkMode={false}
    />
  );
}

export default App;
```


## Props

| **Prop**            | **Type**    | **Required**  | **Description**                                                           |
|-------------------- |------------ |-------------- |-------------------------------------------------------------------------- |
| **disksText**       | 2D array    | yes           | Text to be displayed in each disk                                         |
| **onRotate**        | function    | no            | Function called after a disk is rotated (use to obtain new order of text) |
| **theme**           | object      | no            | Component colouring (options: **main**, **light**, and **dark**)          |
| **disabled**        | boolean     | no            | Whether the disks should be disabled                                      |
| **swipeMode**       | boolean     | no            | Whether the disks are rotated via swipe gestures                          |
| **swipeContainer**  | string      | no            | Selector for a container to restrict swipe gesture detection              |
| **darkMode**        | boolean     | no            | Whether the component theming should be dark or light                     |

---
_Source: https://npm.io/package/react-disks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
