Smooth and fast cross platform Material Design Tabs for React Native Paper
npm install react-native-paper-tabs
react-native-paper-tabs
---
- Smooth and fast cross platform Material Design Tabs for (react-native-paper)
- Tested on Android, iOS and the web
- Simple API
- Typesafe
- Scrollable and fixed
- Leading or top icon
- Performant
- Badges
- Support for Material You
- Uses native components (react-native-viewpager)
- Great React Native Web support
- Implements official spec (material-design-spec)

Web demo: reactnativepapertabs.com
Give us a follow on Twitter:
RichardLindhout,
web_ridge
Yarn
``sh`
yarn add react-native-paper-tabs react-native-pager-view
npm
`sh`
npm install react-native-paper-tabs react-native-pager-view
`tsx
import {
Button,
Title,
Paragraph,
} from 'react-native-paper';
import {
TabsProvider,
Tabs,
TabScreen,
useTabIndex,
useTabNavigation,
} from 'react-native-paper-tabs';
function Example() {
return (
// onChangeIndex={handleChangeIndex} optional
>
// showTextLabel={false} // true/false | default=false (KEEP PROVIDING LABEL WE USE IT AS KEY INTERNALLY + SCREEN READERS)
// iconPosition // leading, top | default=leading
// style={{ backgroundColor:'#fff' }} // works the same as AppBar in react-native-paper
// dark={false} // works the same as AppBar in react-native-paper
// theme={} // works the same as AppBar in react-native-paper
// mode="scrollable" // fixed, scrollable | default=fixed
// showLeadingSpace={true} // (default=true) show leading space in scrollable tabs inside the header
// disableSwipe={false} // (default=false) disable swipe to left/right gestures
// tabHeaderStyle // style object, can be animated properties as well in
// tabLabelStyle // style object
>
icon="bag-suitcase"
// optional props
// badge={true} // only show indicator
// badge="text"
// badge={1}
// onPressIn={() => {
// console.log('onPressIn explore');
// }}
// onPress={() => {
// console.log('onPress explore');
// }}
>
)
}
function ExploreWitHookExamples() {
const goTo = useTabNavigation();
const index = useTabIndex();
return (
);
}
``
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT