Kinetik UI

Tilt Deck

.md

A card that tilts in 3D under the finger, with parallax layers and a drifting floor shadow.

v1.0.0Live on webreact-native-gesture-handlerreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add tilt-deck

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/tilt-deck.json

Install manually

  1. Install dependencies
    npx expo install react-native-gesture-handler react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/tilt-deck.tsx
    View source files

Usage

import { TiltDeck, TiltLayer } from '@/components/kinetik/tilt-deck';

<TiltDeck onPress={openAlbum} accessibilityLabel="Night Drive, album">
  <Artwork />
  <TiltLayer depth={0.5}>
    <Title />
  </TiltLayer>
</TiltDeck>;

Wherever the finger presses, that corner sinks away. Children wrapped in TiltLayer shift by their depth: positive values float above the card, negative values sink below it, 0 stays flat.

When to use

  • Covers, tickets, product shots: objects the user should want to pick up.
  • Cards with layered artwork, where parallax sells the depth.

When not to use

  • Rows in a long list. The effect is for a hero object, not every item.
  • Cards with inputs or several buttons inside; the whole card reacts to every touch.

Notes

  • Touch tracking never claims the gesture: a vertical drag scrolls the page and the card springs back.
  • onPress fires on a tap that does not drag and makes the card a button for screen readers.
  • Give the deck room around it; the floor shadow and the 3% lift extend past its bounds.

Props

TiltDeckProps

PropTypeDefaultDescription
childrenReactNode—
maxTiltnumber12Maximum rotation in degrees. Defaults to 12.
liftnumber1.03Scale while pressed. Defaults to 1.03.
parallaxnumber10How far `TiltLayer`s travel per unit of depth, in pt. Defaults to 10.
onPress() => void—Called on a tap that does not drag. Makes the card a button.
hapticsbooleantruePlays a light tap on press. Defaults to true.
radiusnumber—Corner radius. Defaults to the theme `xl` radius.
styleStyleProp<ViewStyle>—
contentStyleStyleProp<ViewStyle>—Style for the inner content container (padding, layout).

TiltLayerProps

PropTypeDefaultDescription
depthnumber1How far this layer floats above the card. 0 stays flat; 1 travels the deck's full `parallax` distance; negative values sink below the surface.

Performance and accessibility

Performance

Budget
Touch moves retarget two springs on the UI thread; each TiltLayer adds one transform. Nothing runs at rest.
Measured

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

Real-device measurement pending.

Accessibility

Reduced motion
No rotation, parallax or lift; the card dips 2% while pressed.
Screen readers
Button role when onPress is set; pass accessibilityLabel to describe the card. Layers are not separately exposed.
Touch target
The whole card is the target.

Source files

components/kinetik/tilt-deck.tsx is in the Code tab of the preview above.