Skip to content

Simple expandable view with extendable animations. Automatically calculates desired height.

Notifications You must be signed in to change notification settings

kyle-ssg/react-native-simple-expand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expand / collapse, component automatically calculates desired height

Optional Props (See ./example for usage)

  • maxHeight: How far can the view expand
  • minHeight: How much to show in the closed state
  • value: true or false
  • style: Style of child view
  • containerStyle: Style of container
  • animatedValue: Optional Animated.Value(minHeight) used to link animations inline with menu.

Minimal Example

import Expand = from 'react-native-simple-expand';
    render() {

        return (
           <View>
               <TouchableOpacity onPress={() => this.setState({ open: !this.state.open })}>
                <Text>Toggle Menu</Text>
               </TouchableOpacity>
               <Expand value={this.state.open}>
                   <Text>
                    Some very very very very very very very very very very very very very very very very very very very very great content
                   </Text>
               </Expand>
           </View>
        );
    }

About

Simple expandable view with extendable animations. Automatically calculates desired height.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published