npm.io
1.0.3 • Published 6 years ago

exploding-text

Licence
MIT
Version
1.0.3
Deps
1
Size
72 kB
Vulns
0
Weekly
0
Stars
1

exploding-text

A React component that renders text with Physics!

NPM JavaScript Style Guide

Install

npm install --save exploding-text

Usage

import React, { Component } from "react";

import ExplodingText from "exploding-text";

export default class App extends Component {
  render() {
    return (
      <div>
        <ExplodingText
          text={["Example", "Click me!"]}
          lengths={[
            [40, 44, 38, 38, 42, 40, 36],
            [40, 44, 30, 25, 27, 20, 27, 31, 32]
          ]}
          width={800}
          height={600}
          fontSize={64}
          debugDraw={false}
          boundaries={true}
        />
      </div>
    );
  }
}

License

MIT valentijnnieman