Skip to content

Kwonkunkun/react-native-collapsible-component-with-tab-view

Repository files navigation

Welcome to react-native-collapsible-component-with-tab-view 👋

Version License: MIT

Dependency

yarn add react-native-reanimated

and setting refer under uri
(https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation)

and

yarn add react-native-redash

Install

npm i react-native-collapsible-component-with-tab-view

or

yarn add react-native-collapsible-component-with-tab-view

Run example

git clone https://github.com/Kwonkunkun/react-native-collapsible-component-with-tab-view.git

yarn

package.json 
change -> main: "src/index.tsx"

cd example & yarn & yarn ios or android

Usage

...
import { CollapsibleTabBar } from 'react-native-collapsible-component-with-tab-view'

const App = () => {
  return (
    <SafeAreaView>
      <CollapsibleTabBar
        collasibleComponent={
          <View
            style={{
              height: 100,
              alignItems: 'center',
              justifyContent: 'center',
              backgroundColor: 'rgba(255, 255, 200, 1)',
            }}
          >
            <Text>Collapse Section</Text>
          </View>
        }
        tabBarItemList={[
          {
            titleComponent: (
              <View style={{ padding: 20 }}>
                <Text>tab1</Text>
              </View>
            ),
            component: ({tab1Component},
          },
          {
            titleComponent: (
              <View style={{ padding: 20 }}>
                <Text>tab2</Text>
              </View>
            ),
            component: {tab1Component},
          },
        ]}
      />
    </SafeAreaView>
  )
}

Author

👤 KunwooKwon([email protected])

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator