@gnarlycode/react-styled-css-transition
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published
GNARLY CODE Production Introducing

React Styled Css Transition

Helper function for using CSSTransition with Styled Components

Installation

npm i --save @gnarlycode/react-styled-css-transition

Usage

import { css } from 'styled-components'
import { styledCSSTransition } from '@gnarlycode/react-styled-css-transition'

const TransitionComponent = styledCSSTransition(
  {
    mountOnEnter: true,
    timeout: {
      enter: 100,
      exit: 100,
    },
    unmountOnExit: true,
    // any CSSTransitionProps
  },
  css`
    &.appear {}
    &.appear-active {}
    &.enter {}
    &.enter-active {}
    &.exit {}
    &.exit-active {}
  `,
)
Author: Dmitry Podlesny

Readme

Keywords

none

Package Sidebar

Install

npm i @gnarlycode/react-styled-css-transition

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

5.33 kB

Total Files

4

Last publish

Collaborators

  • rezed