react-surfaces

A collection of animated background gradients

Usage no npm install needed!

<script type="module">
  import reactSurfaces from 'https://cdn.skypack.dev/react-surfaces';
</script>

README

react-surfaces

A collection of animated background gradients

NPM JavaScript Style Guide

Install

npm install --save react-surfaces

Usage

import React, { Component } from 'react'

import Surface from 'react-surfaces'

class Example extends Component {
  render() {
    return <Surface 
      variant={2} // defaults to 1, possible values: (1-6)
      color1={'#ff0000'} // defaults to #e52421
      color2={'#0000ff'} // defaults to #0000ff
      transitionDuration={'2s'} // optional
      transitionDelay={'0s'} // optional
      transitionTimingFunction={'ease'} // optional
    />
  }
}

License

MIT © sempostma