Skip to content

Simple grippable component for React Native, powered by Animated API

License

Notifications You must be signed in to change notification settings

a-omsk/react-native-grippable-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-grippable-view

Simple grippable component for React Native, powered by Animated API and some RxJS stuff.

Example

API

import React from 'react';
import { View, Image } from 'react-native'
import Grippable from 'react-native-grippable-view';

export default () => (
  <Grippable
    minHeight={30} // initial height of view
    maxHeight={400} // maximum expanded height of view
    initExpandHeight={200} // initial height of view to expand
    gripperStyles={{ height: 20 }} // styles for gripper component wrapper
    animationOptions={{ duration: 500 }} // additional options for animation
    getGripperComponent={() => <Image source={require('./gripper.png')} />} // the gripper component getter
  >
    <View>
      // some code
    </View>
  </Grippable>
)

TODO

  • Grippable directions (now only "top to bottom")
  • Component methods (e.g. expand / collapse)
  • Events

About

Simple grippable component for React Native, powered by Animated API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published