SwipeUI

Header large title preset

Token-based native-stack large-title options for both routers.

npx @swipeui/cli add header-large-title-preset
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Using the native stack's large title on iOS but in your own theme colours.
  • Apps on Expo Router or React Navigation that want one set of header options shared across screens.
  • When you want the system to handle collapse, scroll-edge effects and Liquid Glass for you.
  • Keeping native header behaviour such as swipe back and VoiceOver exactly as iOS ships it.

When not to use it

  • Android-identical large titles; large titles are an iOS feature of the native stack. Use Collapsing header for a custom one.
  • Headers with images, search or custom animation. Use Collapsing hero header or Search header.
  • Non-native stacks such as the JavaScript stack.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add header-large-title-preset
  • Adds components/swipeui/header/header-large-title-preset.tsx.
  • Installs uniwind. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/library.tsx
import { useLargeTitlePreset } from '@/components/swipeui/header/header-large-title-preset';

const options = useLargeTitlePreset();

<Stack.Screen options={{ ...options, title: 'Library' }} />;

API reference

PropTypeDefaultDescription
headerLargeTitletrue—
headerTintColor?string—
headerLargeTitleStyle{ color?: string; }—
headerStyle{ backgroundColor?: string; }—
headerShadowVisiblefalse—
headerTransparent?true—

Set by transparent and blur: content scrolls under the header.

headerBlurEffect?"systemMaterial"—

Set by blur. iOS only; ignored where the system draws its own scroll-edge material.

headerBackButtonDisplayMode?"minimal"—

Set when backTitleVisible is false.

Composition and behavior

  • useLargeTitlePreset() returns native stack options using your theme tokens.
  • createLargeTitlePreset(colors) builds the same options from colours you pass.
  • Sets the large title, tint, title colour and header background, and hides the shadow.
  • On SDK 58 you can also use headerLargeTitleEnabled and scrollEdgeEffects in SDK-specific code.
  • Options: transparent lets content scroll under the header, blur adds the iOS material, and backTitleVisible set to false shows the back arrow alone.
  • See Liquid Glass and fallbacks and navigation patterns.

Behavior and gestures

  • On iOS, the title starts large and collapses into the navigation bar as you scroll, handled by the system.
  • Back swipes, long-press back menus and scroll-edge effects behave exactly like a native app.
  • The preset only sets colours and options, so behaviour follows your iOS version.

Accessibility

  • Accessibility comes from the native header: VoiceOver, Dynamic Type and the header trait all work as system headers do.
  • Colours come from your foreground and surface tokens, so contrast follows your preset in light and dark.
  • Scrollable content needs contentInsetAdjustmentBehavior="automatic" so the title and content don't overlap.

Motion

  • Static on its own; any movement comes from the parent that animates it.
  • Uses system motion only; your app's motion feel doesn't change the native collapse.
  • System Reduce Motion is respected by iOS itself.

Performance

  • Zero runtime cost beyond reading two colour tokens; everything else is native.

Notes for AI

  • Spread useLargeTitlePreset() into screenOptions or a screen's options.
  • Don't force a blur together with SDK 58's scroll-edge material without checking on a device.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items