# @types/react-scramble

> TypeScript definitions for react-scramble

Latest version **0.4.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-scramble
pnpm add @types/react-scramble
yarn add @types/react-scramble
bun add @types/react-scramble
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.5 |
| Published | 2023-11-07 |
| First published | 2021-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-scramble
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-scramble
- npm.io page: https://npm.io/package/@types/react-scramble

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 0.4.5 (latest) — 2023-11-07
- 0.4.1 (ts3.6) — 2021-07-08
- 0.4.0 (ts3.3) — 2021-01-11
- 0.4.4 — 2023-10-18
- 0.4.3 — 2023-09-27
- 0.4.2 — 2023-09-16

## README

# Installation
> `npm install --save @types/react-scramble`

# Summary
This package contains type definitions for react-scramble (https://github.com/cettoana/react-scramble#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-scramble.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-scramble/index.d.ts)
````ts
import * as React from "react";

export interface Step {
    /**
     * Action of the step, + as scramble, - as descramble and leave blank to do nothing.
     */
    action: "+" | "-";
    /**
     * Times of action in the step.
     */
    roll?: number | undefined;
    /**
     * Change the original text.
     */
    text?: string | undefined;
    /**
     * Scramble/descrmble type of the step.
     */
    type?: "all" | "random" | "forward" | undefined;
}

export interface AnimationControls {
    reset: () => void;
    restart: () => void;
    start: () => void;
    pause: () => void;
}

export interface Props {
    /**
     * Set true to auto start animation after render.
     */
    autoStart?: boolean | undefined;
    /**
     * Scramble the text after render.
     */
    preScramble?: boolean | undefined;
    /**
     * Speed of scramble per second.
     */
    speed?: "slow" | "medium" | "fast" | undefined;
    /**
     * Original text.
     */
    text: string;
    /**
     * Scramble steps, a list of Object in Step format.
     */
    steps: Step[];
    /**
     * Using no-break space or not.
     */
    noBreakSpace?: boolean | undefined;
    /**
     * Event trigger type when mouse enter.
     */
    mouseEnterTrigger?: "start" | "pause" | "reset" | "restart" | undefined;
    /**
     * Event trigger type when mouse leave.
     */
    mouseLeaveTrigger?: "start" | "pause" | "reset" | "restart" | undefined;
    /**
     * Method binding callback function.
     */
    bindMethod?: ((c: AnimationControls) => void) | undefined;
}

/**
 * @example
 * ```
 * import React from 'react'
 * import Scramble from 'react-scramble'
 *
 * class App extends React.Component {
 *   render() {
 *    return (
 *      <Scramble
 *        autoStart
 *        text="Scramble me!"
 *        steps={[
 *          {
 *            roll: 10,
 *            action: '+',
 *            type: 'all',
 *          },
 *          {
 *            action: '-',
 *            type: 'forward',
 *          },
 *        ]}
 *      />
 *    )
 *  }
 * }
 * ```
 */
declare const Scramble: React.FC<Props>;

export default Scramble;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [fes300](https://github.com/fes300).

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