Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

switch-css-transition-group

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

switch-css-transition-group

Combination of ReactCSSTransitionGroup and Switch for triggering transition between child routes.

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

SwitchCSSTransitionGroup

Combination of ReactCSSTransitionGroup and Switch for triggering transitions between routes.

There is no key param because it is changing automatically based on matching routes.

Install

npm i --save switch-css-transition-group

Demo

storybook online

or locally you can try npm run storybook

Usage

import SwitchCSSTransitionGroup from 'switch-css-transition-group'

// your code

<SwitchCSSTransitionGroup
    location={history.location}
    transitionName='example'
    transitionLeaveTimeout={300}
    transitionEnterTimeout={500}>
  <Route path='/' exact component={Home} />
  <Route path='/about' component={About} />
</SwitchCSSTransitionGroup>

Similar like if you are using ReactCSSTransitionGroup and Switch there are available properties:

  • location - your history.location object from react-router
  • transition* - params from ReactCSSTransitionGroup

On this ReactCSSTransitionGroup docs page you will also find how to deal with CSS and how customize more the transitions.

Keywords

switch

FAQs

Package last updated on 28 Mar 2018

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