Genesis

Packages

@marktiderman/genesis-ui-native

3.18.1Foundation · Coreessential

React Native components (NativeWind v4-5). Use in Expo / RN surfaces.

Genesis React Native components and screen layouts for Expo apps (NativeWind). Every component is listed in the component reference.

Some components draw better with a native module your app may or may not have. This package never `require()`s one itself: you import what you installed and pass it once, near the root, and every component falls back to plain React Native for whatever you leave out. (`GenesisNativeApp` from `@marktiderman/genesis-native` takes the same object as its `modules` prop.)

pnpm add @marktiderman/genesis-ui-native

READMEChangelognpm

@marktiderman/genesis-ui-native
React Native components (NativeWind v4-5). Use in Expo / RN surfaces.

Components (138)

Hooks (17)

  • useGenesisExtension

    Read an extension scale by key. Returns `undefined` when the provider isn't mounted OR when the key isn't declared on the brand. The return type follows the consumer's augmented `BrandExtensions[K]`.

  • useGenesisModules

    The modules given to the nearest `GenesisModulesProvider`; `{}` without one.

  • useHaptics

    A function that plays a haptic through the app's `GenesisModules.haptics`. Stable across renders.

  • useHideTabBar

    Hides the tab bar while this screen is focused, and shows it again when it blurs or unmounts. Pass `false` to keep it (a screen that hides it only in one mode). Outside a `TabBarVisibilityProvider` it does nothing.

  • useKeyboardScroll

    The app's keyboard-aware scroll view, or null when none was provided.

  • useKeyboardSticky

    The app's keyboard-riding view for a bottom bar, or null when none was provided (or no scroll view to go with it).

  • useKeyboardToolbar

    The app's keyboard toolbar, or null when none was provided (or no scroll view to go with it).

  • useLiquidGlass

    expo-glass-effect's `GlassView` when Liquid Glass can be drawn here, else `null`.

  • useMotion
  • usePressFeedback
  • useReducedMotion
  • useReduceTransparency

    True while the user has Reduce Transparency on (iOS), `null` until the first answer. Always false elsewhere, and on a runtime that can't say.

  • useTabBarHidden

    Whether a screen has hidden the tab bar: for chrome that sits above it (a floating bar, a mini player).

  • useThemeMode
  • useThemeRoles
  • useThreadJump
  • useToast

Other exports (64)

alertVariants · animateMotion · appleProvider · badgeTextVariants · badgeVariants · buttonTextVariants · buttonVariants · cn · composeHeaderOptions · confirmDiscardChanges · createPlaceExit · DEFAULT_GALLERY_RATIO · defaultNativeLightboxLabels · defaultStickyHeaderOffset · ForgotPasswordLink · formatInboxTime · FULL_SCREEN_DARK · GALLERY_DEFAULTS · galleryItemRatio · getInboxPageStackOptions · getNotificationsPageStackOptions · getSettingsPageStackOptions · getSettingsSubPageStackOptions · getThreadPageStackOptions · googleProvider · iosCompactNavigationBarHeight · isNativeIconName · JUMP_SETTLE_MS · justifyRows · KEYBOARD_TOOLBAR_HEIGHT · KeyboardScrollProvider · LIGHTBOX_DISMISS_DISTANCE · LIGHTBOX_DISMISS_VELOCITY · LIGHTBOX_DOUBLE_TAP_MS · LIGHTBOX_MAX_ZOOM · lightboxPanLimit · lightboxPinchScale · lightboxShouldDismiss · lightboxTouchDistance · motionSpring · motionTiming · NATIVE_ICON_NAMES · NativeCardContent · NativeCardDescription · NativeCardFooter · NativeCardHeader · NativeListItemDivider · NativeNoFeaturesFound · NativeNoFeedbackFound · NativeNoSearchResults · NativeSheetScrollView · nextRating · playHaptic · readReceiptFor · sentBubbleColor · SF_SYMBOLS · showInboxActions · spaceScale · spacingClass · textVariants · THREAD_AT_BOTTOM_POINTS · threadListMode · threadNearBottom · toggleVariants

And 118 types.

@marktiderman/genesis-ui-native/components

Components (118)

Hooks (4)

  • useGenesisModules

    The modules given to the nearest `GenesisModulesProvider`; `{}` without one.

  • useLiquidGlass

    expo-glass-effect's `GlassView` when Liquid Glass can be drawn here, else `null`.

  • useReduceTransparency

    True while the user has Reduce Transparency on (iOS), `null` until the first answer. Always false elsewhere, and on a runtime that can't say.

  • useToast

Other exports (39)

alertVariants · badgeTextVariants · badgeVariants · buttonTextVariants · buttonVariants · DEFAULT_GALLERY_RATIO · defaultNativeLightboxLabels · FULL_SCREEN_DARK · GALLERY_DEFAULTS · galleryItemRatio · isNativeIconName · justifyRows · LIGHTBOX_DISMISS_DISTANCE · LIGHTBOX_DISMISS_VELOCITY · LIGHTBOX_DOUBLE_TAP_MS · LIGHTBOX_MAX_ZOOM · lightboxPanLimit · lightboxPinchScale · lightboxShouldDismiss · lightboxTouchDistance · NATIVE_ICON_NAMES · NativeCardContent · NativeCardDescription · NativeCardFooter · NativeCardHeader · NativeListItemDivider · NativeNoFeaturesFound · NativeNoFeedbackFound · NativeNoSearchResults · NativeSheetScrollView · nextRating · SF_SYMBOLS · spaceScale · spacingClass · textVariants · THREAD_AT_BOTTOM_POINTS · threadListMode · threadNearBottom · toggleVariants

And 74 types.

@marktiderman/genesis-ui-native/data

Components (18)

Hooks (6)

  • useDisplayCell

    Draw one value: the empty mark for no value or a value the row (or viewer) hides (`when`), else its hint's renderer.

  • useDisplayTimeZones

    The clocks for timestamps: the nearest provider's, else the device's for both.

  • useNativeCustomView

    A native custom view's data and states, headless. `<NativeCustomView>` calls it and draws the states.

  • useNativeListMessages

    The list words: the app's catalogue over the English.

  • useNativeResourceView
  • useNativeResourceViewMessages

Other exports (40)

allowed · dateToDay · dayToDate · DEFAULT_MAX_PAGES · defaultNativeListMessages · defaultNativeRecordViewMessages · defaultNativeResourceViewMessages · defaultNativeResourceWorkspaceMessages · DisplayRenderersProvider · displayText · DisplayTimeZonesProvider · formatDay · formatInstant · formFieldsFor · getNativeRecordViewStackOptions · getNativeResourceWorkspaceStackOptions · NATIVE_VIEW_TYPES · nativeDisplayRenderers · NativeRecordViewMenu · NativeResourceBoard · NativeResourceCalendar · NativeResourceViewMessagesProvider · NativeResourceWorkspaceMenu · nativeSwitchableTypes · NativeViewFilterControls · NativeViewSegments · NativeViewTypeSwitcher · openableUrl · parseSettingNumber · resolveZone · rowItem · screenValues · SEARCH_DEBOUNCE_MS · sectionsFor · SEGMENTED_SECTIONS_MAX · serverSort · serverSorts · swipeActionsFor · validateValues · writableValues

And 29 types.

@marktiderman/genesis-ui-native/hooks

Components (1)

  • BrandExtensionsProvider

Hooks (8)

  • useGenesisExtension

    Read an extension scale by key. Returns `undefined` when the provider isn't mounted OR when the key isn't declared on the brand. The return type follows the consumer's augmented `BrandExtensions[K]`.

  • useHaptics

    A function that plays a haptic through the app's `GenesisModules.haptics`. Stable across renders.

  • useMotion
  • usePressFeedback
  • useReducedMotion
  • useThemeMode
  • useThemeRoles
  • useThreadJump

Other exports (6)

animateMotion · JUMP_SETTLE_MS · motionSpring · motionTiming · playHaptic · sentBubbleColor

And 14 types.

@marktiderman/genesis-ui-native/layouts

Components (19)

Hooks (5)

  • useHideTabBar

    Hides the tab bar while this screen is focused, and shows it again when it blurs or unmounts. Pass `false` to keep it (a screen that hides it only in one mode). Outside a `TabBarVisibilityProvider` it does nothing.

  • useKeyboardScroll

    The app's keyboard-aware scroll view, or null when none was provided.

  • useKeyboardSticky

    The app's keyboard-riding view for a bottom bar, or null when none was provided (or no scroll view to go with it).

  • useKeyboardToolbar

    The app's keyboard toolbar, or null when none was provided (or no scroll view to go with it).

  • useTabBarHidden

    Whether a screen has hidden the tab bar: for chrome that sits above it (a floating bar, a mini player).

Other exports (18)

appleProvider · composeHeaderOptions · confirmDiscardChanges · createPlaceExit · defaultStickyHeaderOffset · ForgotPasswordLink · formatInboxTime · getInboxPageStackOptions · getNotificationsPageStackOptions · getSettingsPageStackOptions · getSettingsSubPageStackOptions · getThreadPageStackOptions · googleProvider · iosCompactNavigationBarHeight · KEYBOARD_TOOLBAR_HEIGHT · KeyboardScrollProvider · readReceiptFor · showInboxActions

And 30 types.

@marktiderman/genesis-ui-native/utils

Other exports (1)

cn

@marktiderman/genesis-ui-native/icons/lucide

Other exports (1)

lucideIcons