Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@bacons/expo-router-top-tabs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bacons/expo-router-top-tabs

Top tabs with optional header in Expo Router

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@bacons/expo-router-top-tabs

Wraps react-native-collapsible-tab-view and adds support for Expo Router.

Add the package to your npm dependencies

yarn add @bacons/expo-router-top-tabs react-native-reanimated
  • Setup Reanimated in the babel.config.js. See here for more info.

Usage

Example in Layout Route:

// app/(tabs)/_layout.tsx

import { Text, View } from "react-native";
import { TopTabs } from "@bacons/expo-router-top-tabs";

export default function CustomLayout() {
  return (
    <TopTabs screenOptions={{}}>
      <TopTabs.Header>
        <View pointerEvents="none" style={{}}>
          <Text>Header</Text>
        </View>
      </TopTabs.Header>

      <TopTabs.Screen name="index" />
    </TopTabs>
  );
}

Usage in child routes:

// app/(tabs)/index.tsx

import { Animated } from "react-native";
import { useScrollProps } from "@bacons/expo-router-top-tabs";

export default function Screen() {
  const props = useScrollProps();

  return <Animated.ScrollView {...props}></Animated.ScrollView>;
}

Keywords

expo-router

FAQs

Package last updated on 26 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts