An open API service indexing awesome lists of open source software.

https://github.com/punksta/react-native-auto-collapsible

React-native view which automatically collapses or expands on content size changes
https://github.com/punksta/react-native-auto-collapsible

react react-native react-native-component react-native-library

Last synced: about 1 month ago
JSON representation

React-native view which automatically collapses or expands on content size changes

Awesome Lists containing this project

README

          

# react-native-auto-collapsible
React-native view which automatically collapses or expands when content changes height.

## purpose
Useful for lists of items with dynamic contents to avoid jumping on view height change

https://snack.expo.io/Sy0l5vruE - demo

## usage
1) install `npm install react-native-auto-collapsible --save` / `yarn add react-native-auto-collapsible`
2) use

```javascript
import AutoCollapsible from "react-native-auto-collapsible"

const render = (props) => (



)
```

or as HOC
```javascript
import {AutoCollapsibleHOC} from "react-native-auto-collapsible"

const CollapsibleMyComp = AutoCollapsibleHOC({})(MyComp);
```

## Props
- resizeAnimation - sets custom animation
```javascript
resizeAnimation = (animatedValue, newHeight) =>
Animated.spring(animatedValue, {
toValue: newHeight,
duration: 200
})
```