react-native-bpk-component-animate-height
Backpack React Native animate height component.
Installation
npm install react-native-bpk-component-animate-height --save-dev
Usage
;;;;;; const styles = StyleSheet; { super; thisstate = expanded: false ; } { this; } { return <View style=stylescontainer> <BpkAnimateHeight expanded=thisstateexpanded style=stylesanimateHeight > <BpkText> Lorem ipsum dolor sit amet consectetuer adipiscing elit Aenean commodo ligula eget dolor Aenean massa Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus </BpkText> </BpkAnimateHeight> <BpkButton title="Toggle" onPress=thisonToggle /> </View> ; }
Props
Property | PropType | Required | Default Value |
---|---|---|---|
children | Node | Yes | - |
expanded | bool | Yes | - |
animationDuration | number | No | 400 |
expandDelay | number | No | 0 |
collapseDelay | number | No | 0 |