Kinetik UI

Parallax Header

.md

A scroll view whose header artwork scrolls at half speed, stretches on pull and hands off to a compact bar.

v1.0.0Live on webreact-native-reanimatedreact-native-safe-area-contextreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add parallax-header

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/parallax-header.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-safe-area-context react-native-worklets
  2. Copy the source files
    • components/kinetik/parallax-header.tsx
    View source files

Usage

import { ParallaxHeader } from '@/components/kinetik/parallax-header';

<ParallaxHeader
  title="Long Exposure"
  subtitle="Lumen Fields · 10 tracks"
  header={<Image source={cover} style={StyleSheet.absoluteFill} />}
>
  <TrackList />
</ParallaxHeader>;

ParallaxHeader is the scroll view: put the screen's content inside it. The artwork fills headerHeight and should cover its area (StyleSheet.absoluteFill).

When to use

  • Detail screens led by an image: albums, places, profiles, products.
  • Screens where the title should stay reachable after the hero scrolls away.

When not to use

  • Lists without a meaningful hero; a plain header is quieter.
  • Screens that already use a native large-title navigation bar. Pick one.

Notes

  • The stretch on pull-down needs bounce scrolling (iOS); Android scrolls without it.
  • The compact bar starts below topInset (the safe-area top by default). Pass 0 when the component is not at the top of the screen.
  • Use barAccessory for a share or close button that stays visible.

Props

ParallaxHeaderProps

PropTypeDefaultDescription
childrenrequiredReactNode—Scrollable content below the header.
headerrequiredReactNode—Header artwork (image, gradient, illustration). Fills the header area.
titlerequiredstring—Large title shown over the artwork and in the compact bar once scrolled.
subtitlestring—Small line under the large title.
headerHeightnumber300Height of the expanded header, in pt. Defaults to 300.
barHeightnumber52Height of the compact bar below the status bar, in pt. Defaults to 52.
topInsetnumber—Distance from the top of the screen to the bar. Defaults to the safe-area inset.
barAccessoryReactNode—Content shown at the right of the compact bar (e.g. a button).
styleStyleProp<ViewStyle>—
contentContainerStyleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The scroll offset is read on the UI thread; four style worklets (artwork, title, bar, bar title) run per scroll frame. No JS work while scrolling.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.90× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 148 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The artwork scrolls with the content instead of at half speed; titles fade without moving.
Screen readers
The large title is a header; the compact bar's copy of it is hidden to avoid reading it twice. Artwork is decorative.
Touch target
Not interactive itself; barAccessory keeps its own targets.

Source files

components/kinetik/parallax-header.tsx is in the Code tab of the preview above.