# react-native-simple-transition

> A small component that automatically transitions child changes

Latest version **0.0.11** (published 2025-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-simple-transition
pnpm add react-native-simple-transition
yarn add react-native-simple-transition
bun add react-native-simple-transition
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2025-07-27 |
| First published | 2020-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Lars Melchior |
| Maintainers | the-lartians |
| Keywords | android, animation, fade, ios, mobile, react-native, react-native-component, transition, ui |

## Links

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

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.11 (latest) — 2025-07-27
- 0.0.10 — 2020-08-17
- 0.0.9 — 2020-08-17
- 0.0.8 — 2020-08-17
- 0.0.7 — 2020-08-17
- 0.0.6 — 2020-08-17
- 0.0.5 — 2020-08-17
- 0.0.4 — 2020-08-17
- 0.0.3 — 2020-08-17
- 0.0.2 — 2020-08-17
- 0.0.1 — 2020-08-17

## README

![Build](https://github.com/TheLartians/react-native-simple-transition/workflows/Build/badge.svg)
[![npm version](https://badge.fury.io/js/react-native-simple-transition.svg)](https://badge.fury.io/js/react-native-simple-transition)

# react-native-simple-transition

A minimalist and easy to use transition component for React Native.

![animated example](./example/showcase.gif)

## Usage

Install the library

```bash
yarn add react-native-simple-transition
```

Create a transition component and add the content as a child.
New components will transition with an animation every time the content key changes.

```tsx
import { WithPushTransition } from 'react-native-simple-transition';

const MyComponent = () => {
  const [count, setCount] = useState(0);
  
  return (
    <WithPushTransition contentKey={count} style={{flex: 1}}>
      <Text onPress={() => setCount(count+1)}>
        This component will smoothly transition on key changes.
      </Text>
    </WithPushTransition>
  )
}
```

Currently the only transition component is `WithPushTransition`.
More are planned to be added soon.

## WithPushTransition

### Optional properties

- `contentKey`: alternative to updating the child's `key` property
- `duration`: transition duration in milliseconds
- `style`: the style given to the transition component
- `easing`: an [easing function](https://reactnative.dev/docs/easing) for the transition
- `direction`: the direction of the transition; can be `"left"`, `"right"`, `"up"` or `"down"`

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