Kinetik UI

Glint Card

.md

A card with a specular glint that slides with the finger or the tilt of the device.

v1.0.0Live on web@shopify/react-native-skiareact-native-gesture-handlerreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add glint-card

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/glint-card.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-gesture-handler react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/glint-card.tsx
    View source files

Usage

import { GlintCard } from '@/components/kinetik/glint-card';

export function Pass() {
  return (
    <GlintCard accessibilityLabel="Night pass, gate 4">
      <Text>Night pass</Text>
    </GlintCard>
  );
}

The light follows the finger while it touches the card and the device tilt the rest of the time. The touch tracking never claims the gesture, so a GlintCard inside a ScrollView still scrolls normally.

When to use

  • A hero object the user is meant to pick up and look at: a pass, a ticket, a membership or achievement card.
  • One or two cards per screen, where the reflection adds a sense of material.

When not to use

  • Long lists of cards. Every live card runs its own sensor; set reduceEffects or pass active={false} to cards that are off-screen.
  • Cards whose main job is navigation. Pair the glint with a press response (see Press Jelly) instead of relying on it as feedback.

Notes

  • With source="tilt" or "both" the card registers the gravity sensor while mounted and active. Unmounting it, or setting active={false}, unregisters the sensor.
  • The neutral pose recentres to however the user is holding the device, so the light always starts at rest.
  • Content is rendered beneath the glint. On dark surfaces the glint only brightens; on light surfaces (where white light cannot brighten white) it shades the card by up to 7 % away from the light instead, so check text contrast against a slightly darker card.
  • Tilt changes too small to see are ignored, so a phone lying still does not redraw the card.

Props

GlintCardProps

PropTypeDefaultDescription
childrenReactNode—
sourceGlintSource'both'What moves the light. Defaults to `both`: finger while touching, device tilt otherwise.
intensitynumber0.7Strength of the glint, 0–1. Defaults to 0.7.
glintColorstring—Colour of the reflected light. Defaults to the theme highlight.
tiltDegreesnumber4Maximum card rotation in degrees as the light moves. 0 keeps the card flat. Defaults to 4.
radiusnumber—Corner radius. Defaults to the theme `xl` radius.
reduceEffectsbooleanfalseStatic reflection with no sensor or gesture work. Use on low-power devices or in long lists. Reduced-motion users always get this.
activebooleantruePause sensor and gesture work, e.g. while the card is off-screen. Defaults to true.
styleStyleProp<ViewStyle>—
contentStyleStyleProp<ViewStyle>—Style of the inner content container (padding, layout).

Performance and accessibility

Performance

Budget
Idle: no per-frame work. Moving: three gradients redrawn by Skia on the UI thread.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.60× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 164 MB app memory. Tilt changes below the visible threshold are ignored, so a phone at rest stops redrawing (was 113 frames per 5 s before). Heaviest interaction cost in the set: three gradients and a 3D transform per frame.

Real-device measurement pending.

Accessibility

Reduced motion
Static reflection; tilt sensor and touch tracking are not started.
Screen readers
Canvas is hidden from assistive tech; pass accessibilityLabel/Role to describe the card.
Touch target
Not interactive by itself; any controls inside keep their own targets.

Source files

components/kinetik/glint-card.tsx is in the Code tab of the preview above.