# scss-react-transition

> A scss @mixin for building react-transition-group css markup

Latest version **0.2.2** (published 2018-02-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install scss-react-transition
pnpm add scss-react-transition
yarn add scss-react-transition
bun add scss-react-transition
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2018-02-05 |
| First published | 2018-01-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jpfiorilla |
| Maintainers | jpfiorilla |
| Keywords | scss, react-transition-group, css, transition, react-transition |

## Links

- npm: https://www.npmjs.com/package/scss-react-transition
- Repository: https://github.com/jpfiorilla/scss-react-transition
- Homepage: https://github.com/jpfiorilla/scss-react-transition#readme
- Issues: https://github.com/jpfiorilla/scss-react-transition/issues
- npm.io page: https://npm.io/package/scss-react-transition

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.2.2 (latest) — 2018-02-05
- 0.2.1 — 2018-01-25
- 0.2.0 — 2018-01-25
- 0.1.2 — 2018-01-24
- 0.1.1 — 2018-01-24
- 0.1.0 — 2018-01-24

## README

## Easy markup for react-transition-group

For when you don't feel like googling that weird pattern `react-transition-group` and its variants use every dang time.

Handles one or multiple class/id names, timings, and eases.

```scss
@import '../node_modules/scss-react-transition/scss-react-transition.scss';

@include transition('test #test2', (opacity: (0.01, 1), max-height: (0, 30px, 20px)), 150 0.1s, ease ease-out);
```

yields:

```css
.test-enter, #test2-enter {
  opacity: 0.01;
  max-height: 0;
}

.test-enter.test-enter-active, #test2-enter#test2-enter-active {
  opacity: 1;
  max-height: 30px;
  transition: 150ms ease;
}

.test-exit, .test-leave, #test2-exit, #test2-leave {
  opacity: 1;
  max-height: 20px;
}

.test-exit.test-exit-active, .test-leave.test-leave-active, #test2-exit#test2-exit-active, #test2-leave#test2-leave-active {
  opacity: 0.01;
  max-height: 0;
  transition: 0.1s ease-out;
}
```

(It does both `-exit` and `-leave` for the out transitions because they changed the class names in the React 16 version.)

| Argument        | Default value | Default unit              | Required |
| --------------- | ------------- | ------------------------- | -------- |
| Classnames      | none          | string or list            | yes      |
| Props           | none          | list                      | yes      |
| Transition time | 150ms         | ms if unitless, accepts s | no       |
| Transition ease | ease          | an ease type              | no       |

## Intro animation only

Play only the intro animation by setting a property's third argument to `null`:

```scss
@include transition('introOnly', (transform: (translateY(-10px), initial, null)));
```

```css
.introOnly-enter {
  transform: translateY(-10px);
}

.introOnly-enter.introOnly-enter-active {
  transform: initial;
  transition: 150ms ease;
}
```

---
_Source: https://npm.io/package/scss-react-transition · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
