Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

directions-transition-group

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directions-transition-group

This is a small extension of Facebook's `TransitionGroup` and `TransitionGroupChild` components from React source code.

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

This is a small extension of Facebook's TransitionGroup and TransitionGroupChild components from React source code.

What's changed

TransitionGroup listens for bubbling click events from elements inside it and looks for data-direction attribute. Then, it sets a class for animated element: <animation name>-direction-<direction name>.

There is also a setDirection method on TransitionGroup to set direction name programmatically.

Usage

var TransitionGroup = require('directions-transition-group');

// Wrap your element

<TransitionGroup name="slide" ref="tg">
  <RouteHandler />
</TransitionGroup>

// Assign data-direction attribute

<a href="#next" data-direction="forward">Next</a> //will add .slide-direction-forward class when animating elements
<Link to="step-one" data-direction="whatever">Back</Link> //will add .slide-direction-whatever class when animating elements

// "API"
this.refs.tg.setDirection("swap");

Keywords

FAQs

Package last updated on 09 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc