npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@onekeyfe/react-native-bottom-tabs

v6.8.0-54

Published

Native bottom tabs (tab bar + scene container) for React Native on iOS and Android

Readme

@onekeyfe/react-native-bottom-tabs

Native bottom-tab navigation for OneKey apps on iOS and Android — the platform owns the tab bar, the application owns routing.

npm license iOS Android Fabric

A controlled tab container that renders the real UITabBarController on iOS and a Material or floating native bar on Android, while the application supplies the navigation state and scene components. Tab selection, badges, icons, lazy scene mounting, double-press detection and the optional left drawer are handled by the native view. The package targets iOS and Android only; it has no Web implementation and no route definitions of its own.

Features

  • Platform-native tab bars — UIKit tab bar on iOS, Material BottomNavigationView or a floating capsule bar on Android, with the system's own gestures and insets.
  • Controlled navigation state — pass { index, routes }, render scenes from stable route keys, and update your own state in onIndexChange.
  • Lazy and frozen scenes — lazy/getLazy and freezeOnBlur control when a scene mounts and whether it keeps rendering in the background.
  • Rich tab metadata — labels, badges, tints, SF Symbols, named icons, image sources, hidden tabs, test IDs and roles.
  • Native drawer and Android options — an optional physical-left menu, a floating bar with live blur on Android 16+, ripple and inset controls.

Installation

yarn add @onekeyfe/react-native-bottom-tabs @onekeyfe/react-native-image

Peer dependencies: react, react-native and @onekeyfe/react-native-image, which provides the native SVG decoder for named and SVG tab icons. The package registers native views, so install the app's iOS pods and rebuild the native binary; a JavaScript-only install does not register the tab bar:

cd ios && pod install

Android links through autolinking; deployment floors are iOS 15.1 and Android API 24.

Usage

import { useState } from 'react';
import { Text } from 'react-native';
import BottomTabs, { SceneMap } from '@onekeyfe/react-native-bottom-tabs';

const HomeScene = () => <Text>Home</Text>;
const SettingsScene = () => <Text>Settings</Text>;

const renderScene = SceneMap({ home: HomeScene, settings: SettingsScene });

const routes = [
  { key: 'home', title: 'Home' },
  { key: 'settings', title: 'Settings', badge: '3' },
];

export function AppTabs() {
  const [index, setIndex] = useState(0);
  return (
    <BottomTabs
      navigationState={{ index, routes }}
      onIndexChange={setIndex}
      renderScene={renderScene}
    />
  );
}

The application owns routes, selection state and scene content; the native view owns the tab bar, gestures and scene freezing. Keep the routes array stable unless the route definitions actually change.

API

Exports

| Export | Platforms | Description | | --- | :-: | --- | | BottomTabs (default) | iOS, Android | Controlled native tab container and scene host. | | SceneMap | iOS, Android | Builds a renderScene function from a route-key → component map. | | useBottomTabBarHeight() | iOS, Android | Native tab-bar height in logical units (0 while hidden); must be inside the tab container. | | BottomTabBarHeightContext | iOS, Android | Context that provides the same height to scene content. | | AppleIcon, NamedIcon, BottomTabIconSource, TabRole, TabBarPlacement | iOS, Android | Icon and tab typing helpers, including { sfSymbol } and { iconName }. |

BottomTabs props

| Prop | Type | Platforms | Description | | --- | --- | :-: | --- | | navigationState, renderScene | { index, routes }, function | iOS, Android | Required selected index, keyed routes and scene renderer. | | onIndexChange, onTabDoublePress | callbacks | iOS, Android | Tab change; second press on the selected tab within the platform double-tap timeout. | | renderLazyPlaceholder, getLazy, getFreezeOnBlur, getSceneStyle | functions | iOS, Android | Lazy placeholder, per-route lazy/freeze and scene style. | | getLabelText, getBadge, getIcon, getHidden, getTestID, getActiveTintColor | functions | iOS, Android | Per-route metadata and tint resolvers; each defaults to the matching route field. | | getRole | function | iOS | System search-tab role. | | getBadgeBackgroundColor, getBadgeTextColor | functions | Android | Badge background and text colors. | | tabBar, tabBarStyle, tabLabelStyle, tabBarActiveTintColor, tabBarInactiveTintColor | component/props | iOS, Android | Custom JS bar replacing the native bar, plus bar background, label font and tints. | | tabBarHidden, labeled, hapticFeedbackEnabled, delayedFreeze | boolean | iOS, Android | Visibility, labels, haptics and delayed freeze/unfreeze. | | translucent, disablePageAnimations, sidebarAdaptable, scrollEdgeAppearance | platform options | iOS | Translucency, page animations, adaptable/sidebar style and scroll-edge appearance. | | minimizeBehavior, renderBottomAccessoryView | options | iOS 26+ | Tab-bar minimizing behavior and an accessory view above the bar. | | onTabBarPlacementChange, sideAccessoryIcon, onSideAccessoryPress | event/style props | iOS | Vertical placement (iPhone Duo) and its side accessory button. | | androidTabBarStyle, androidBottomBlurEnabled | platform props | Android | Material docked or floating capsule bar; live blur defaults on for Android 16+. | | rippleColor, activeIndicatorColor, ignoreBottomInsets, ignoreKeyboardInsets | platform props | Android | Ripple, indicator, navigation-bar and keyboard inset controls. | | renderDrawerContent, drawerOpen, drawerSwipeEnabled, onDrawerOpenChange | drawer props | iOS, Android | Optional native left drawer and its controlled state. |

Route fields such as title, badge, focusedIcon, unfocusedIcon, lazy, hidden, role, preventsDefault and freezeOnBlur mirror the resolvers above; see src/types.ts and src/BottomTabs.tsx.

Platform support

| Capability | iOS | Android | | --- | :-: | :-: | | Native tab bar, selection and scenes | ✅ | ✅ | | Lazy scenes and freeze-on-blur | ✅ | ✅ | | Labels, badges and icon sources | ✅ | ✅ | | Native left drawer | ✅ | ✅ | | Double press with scroll-to-top | ✅ | ✅ | | Floating capsule bar and live background blur | — | ✅ | | Bottom accessory view, minimize behavior, vertical placement | ✅ iOS 26+ | — |

Caveats

[!WARNING] This package has no Web implementation. It targets the iOS and Android native tab bar only; do not mount it in a Web bundle.

[!IMPORTANT] Android supports at most 100 tabs. Routes beyond the first 100 are dropped with a console warning, so keep the navigation state within that bound.

[!NOTE] Tab long press is not supported: onTabLongPress and the native long-press recognizers were removed. Use onTabDoublePress for a second press on the already selected tab.

References

Upstream attribution

First, a sincere thank-you to Oskar Kwaśniewski and the react-native-bottom-tabs maintainers for their excellent work 🙏

This package is built on, and inspired by, okwasniewski/react-native-bottom-tabs.

Our original plan was to keep our customizations as patches on top of upstream react-native-bottom-tabs.

As our product requirements evolved, the scope of those changes outgrew what we could reasonably maintain as an upstream patch set. We regret that we were unable to keep this work in patch form.

As the gap grew, we ultimately forked react-native-bottom-tabs to keep development and delivery stable.

  • Upstream repository: okwasniewski/react-native-bottom-tabs
  • License: MIT
  • This fork includes OneKey-specific adaptations for our product requirements.
  • For original behavior and full documentation, refer to the upstream repository.

Thank you again to Oskar Kwaśniewski and everyone who contributes to react-native-bottom-tabs 💙

License

MIT. See LICENSE.