Skip to content

A simple example of how styled-components could implement react-transition-group to solve transitions.

Notifications You must be signed in to change notification settings

ezsper/styled-components-transition-group

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

styled-components-transition-group

A simple example of how styled-components could implement react-transition-group (based on issue #1036) to solve transitions.

import styled from 'styled-components-transition-group';

// transition() wraps TransitionGroup
const List = styled.div.transition() ``;

// animated() wraps CSSTransition
const ListItem = styled.div.animated() `
  transition: opacity 300ms cubic-bezier(0.4, 0.0, 0.2, 1) 0ms;

  &:appear, &:enter, &:exit {
    opacity: 0;
  }
  &:appear-active, &:enter-active {
    opacity: 1;
  }
`;

Launch storybook for a working example of this proposition.

storybook

About

A simple example of how styled-components could implement react-transition-group to solve transitions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published