Skip to content
nexubDesign System
v2.4.0

Getting started

React Native

alpha

@nexub/react-native brings Nexub to iOS and Android apps built with Expo or bare React Native. Same tokens, product brands and prop names as @nexub/react, so one design change ships to web and mobile.

Native chrome, Nexub content

The operating system draws the navigation: tab bar, stack header and back gesture, action sheets, date pickers and iOS 26 Liquid Glass. Nexub colours it, so apps feel native on each platform. Everything people read and tap inside a screen (lists, cards, buttons, inputs, money) is drawn by Nexub and looks the same on iOS, Android and the web.

Install

npx expo install @nexub/react-native react-native-reanimated react-native-worklets react-native-svg react-native-safe-area-context expo-font

Optional: expo-haptics (haptics), expo-glass-effect (Liquid Glass on iOS 26+), expo-screen-capture (PrivacyShield) and @react-native-community/datetimepicker (DateTimeField). Supported: Expo SDK 57+ / React Native 0.86+.

Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.

Set up

import { useFonts } from 'expo-font';
import { Stack } from 'expo-router';
import { NexubNativeProvider, ToastProvider, nexubFonts, useNexubNavigation } from '@nexub/react-native';

function Screens() {
  const nav = useNexubNavigation();
  return <Stack screenOptions={nav.stack} />;
}

export default function RootLayout() {
  const [ready] = useFonts(nexubFonts);
  if (!ready) return null;
  return (
    <NexubNativeProvider product="payub">
      <ToastProvider>
        <Screens />
      </ToastProvider>
    </NexubNativeProvider>
  );
}

product picks the brand (Leap, Bookub, Payub, Founderub); seed white-labels any other. Light/dark, contrast, Reduce Motion and Reduce Transparency follow the OS unless you set them.

Web → native

Every web component with a native twin. Open one to see both platforms side by side and how they differ.

Web components and their React Native twins
@nexub/react@nexub/react-nativeDifferences
ButtonButton5 (variants, icons, primary action size, feedback, hit area)
Icon ButtonIconButton3 (icon, toggle, hit area)
Button GroupButtonGroup1 (layout)
Split ButtonButton + ActionSheet1 (pattern)
LinkLink2 (navigation, hit area)
AmountAmount2 (sizes, formatting)
BadgeBadge2 (dot, sizes)
AvatarAvatar1 (status)
Avatar GroupAvatarGroupNone
SeparatorDivider1 (name and inset)
CardCard2 (interaction, surface)
AccordionAccordion1 (api)
InputTextField2 (label, keyboard)
Form FieldTextField1 (label)
Password InputPasswordInput1 (autofill)
Search InputSearchField1 (name)
Money InputMoneyInput1 (large entry)
Number InputStepper1 (control)
CheckboxCheckbox2 (label, in lists)
Radio GroupRadioGroup1 (label)
SwitchSwitch2 (look, label)
Segmented ControlSegmentedControl1 (api)
SliderSlider1 (label)
ChipChip1 (hit area)
Filter ChipFilterChip1 (hit area)
SelectSelect2 (menu, label)
Date PickerDateTimeField1 (picker)
BannerBanner1 (scope)
AlertBanner1 (name)
ToastToastProvider + useToast2 (stack, timing)
DialogDialog1 (use)
Alert DialogDialog1 (dismiss)
DrawerBottomSheet1 (edge)
SheetBottomSheet1 (edge)
ProgressProgress1 (label)
SpinnerLoadingIndicator1 (name)
SkeletonSkeletonNone
Empty StateEmptyStateNone
Error StateErrorStateNone
dropdown-menuContextMenu / ActionSheet1 (trigger)

Mobile only

Components that only make sense on a phone.

List ItemOne row, one target: navigation, switch, checkbox, radio, button and value rows, read as one element.List SectionInset-grouped list with a header and footer, like iOS Settings.Bottom SheetA sheet from the bottom with detents, a grabber and keyboard handling. Works in Expo Go; no native dependency.Action SheetA list of actions from the bottom: the system sheet on iOS, a Nexub sheet on Android.Context MenuLong-press menu with the actions also exposed as accessibility actions.Swipeable RowSwipe a row to reveal actions; every swipe action is also an accessibility action.Refresh ControlPull to refresh in Nexub colours.OTP InputOne field drawn as cells, so SMS one-time-code autofill works on iOS and Android.Numeric KeypadAn on-screen keypad for amounts and PINs, with the locale’s decimal key.Expressive Money InputThe big amount on a send-money screen; pair with NumericKeypad.Date Time FieldOpens the platform date or time picker.Sensitive ValueMasks a balance or card number until revealed; re-masks when the app goes to the background and reads as "hidden".Privacy ShieldCovers the app in the app switcher and can block screenshots (expo-screen-capture).CarouselPaged horizontal list with snapping; pair with PageIndicator.Page IndicatorDots for a carousel or onboarding pages.Sticky FooterKeeps the primary action above the keyboard and home indicator.Offline BannerA slim banner while the device is offline.CoachmarkA one-time hint pointing at a control, dismissed by the user.FABFloating action button. Android only by default (`platforms`), since it reads as Material.

Rules the components follow

Built in
  • Every control reaches a 44pt touch target; primary actions use size="lg".

  • Text scales with the system size; on iOS each role follows its Dynamic Type curve.

  • A list row is one screen-reader element; swipe and long-press actions are also accessibility actions.

  • Money screens hide balances with SensitiveValue, cover the app switcher with PrivacyShield and enter codes with OTPInput (SMS autofill).

Avoid
  • Haptics on plain taps, or as the only feedback.

  • Glass on content: it is for the control layer only, and turns solid when the user reduces transparency.

  • Web patterns on phones: no hover, no split buttons, no popover menus; use sheets and long-press.

  • Dialogs for forms: use a BottomSheet or a screen.