🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-native-floating-tab

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-floating-tab

A collection of simple animated floating bottom tabs for React Native. Supports React Navigation and Expo Router.

1.0.21-beta.1
latest
Source
npm
Version published
Weekly downloads
2
-80%
Maintainers
0
Weekly downloads
 
Created
Source

react-native-floating-tab

A collection of simple animated floating bottom tabs for React Native. Supports React Navigation and Expo Router

Note: This is a beta release and may contain bugs. A report and a fix for any bugs found will be highly appreciated.

Demo

See the demo of the components here => Demo

Requirements

  • React Native 0.72 and above | React Native
  • Expo SDK 51 and above | Expo SDK
  • React Navigation or Expo Router | React Navigation | Expo Router
  • React Native Reanimated (by default included in Expo) | React Native Reanimated
  • React Native SVG | React Native SVG

Installation

npm install react-native-floating-tab

Usage

import { ExpandBarTab, RollingBallTab, SharpCurvyTab, SlideBarTab, ElevatedTab } from "react-native-floating-tab";

export default function TabLayout() {

    return (
        <Tabs
            screenOptions={{
                tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
                headerShown: false,
            }}
            initialRouteName="index"
            backBehavior="history"
            tabBar={props => <ExpandBarTab {...props} />}
            // tabBar={props => <RollingBallTab {...props} />}
            // tabBar={props => <SharpCurvyTab {...props} />}
            // tabBar={props => <SlideBarTab {...props} />}
            // tabBar={props => <ElevatedTab {...props} />}
        >
            <Tabs.Screen
                name="calendar"
                options={{
                    title: "Calendar",
                    tabBarIcon: ({ focused, color, size }) => (
                        <Ionicons
                            name={focused ? "calendar" : "calendar-outline"}
                            size={size}
                            color={color}
                        />
                    ),
                }}
            />
            {/* Add more screens here */}
        </Tabs>
    )

}

Running the Example

To run the example, clone the repository and run the following commands. Make sure your project environment is set up properly.

cd example
npm install

# For Android
npm run android

# For iOS
npm run ios

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. I'm still working on improving the library and adding more features. Any contributions you make are greatly appreciated.

Note: A detailed Contributing guide will be added soon.

Running the project locally

To run the project locally, clone the repository and run the following commands. Make sure your project environment is set up properly.

npm install

npm run build # I haven't add any test yet. So, just build the project

After successful build, you can locally package the library and use it in your project.

npm pack

This will create a .tgz file in the root directory. You can use this file in your project by moving it to the example directory and running npm install <package.tgz>.

Then, run the example project as mentioned above.

License

See the LICENSE file for license rights and limitations (MIT).

Built with ❤️ by Moeen Mahmud

Keywords

react-native

FAQs

Package last updated on 10 Oct 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