Code Monkey home page Code Monkey logo

react-shake-effect's Introduction

React Shake Effect

Shake is a React component that applies a linear or axial oscillation effect to any HTML target element. The effect can be applied to any axis (x, y, z) of a target for a set duration and has the ability to be dampened. The effect is easily configured and controlled with 5 parameters such as amplitude and frequency. The effect adjusts a target's transform property to achieve the desired result without disrupting the target's original transform state. This makes possible deploying the effect to an existing HTML element without having to refactor original HTML topography or CSS treatments. The end result is an easy way to add subtle visual effects to predesigned elements or elements in need of emphasis or attention. The component targets a single child and applies the effect via the applyShake() method. Callback properties for Ready, Start, Change, and Complete are provided.

Features

  • Full React/Flux pattern
  • Callbacks for onStart, onReady, onChange, onComplete
  • Supports x, y, and z axis linear and radial motion
  • Supports dampening and time clipping

Learn more

See the demo at http://www.uismithing.com/main/wares/shake.

Repository

https://github.com/uismithing/react-shake-effect

Install

npm install react-shake-effect -s

Deploy

import Shake from "react-shake-effect"

<Shake id="linear-yaxis-container" ref="linearyaxis" {...linearaxisProfile}>
	<div id="shake-cardtarget-linearyaxis-container" className="shake-cardtarget"></div>
</Shake>

react-shake-effect's People

Contributors

uismithing avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.