Kinetik UI

Shine Text

.md

A line of text with a band of light sweeping across the glyphs.

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

Installation

Kinetik CLI
npx kinetik-ui add shine-text

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/shine-text.json

Install manually

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

Usage

import { ShineText } from '@/components/kinetik/shine-text';

<ShineText text="Unlock Pro" fontSize={40} />;

The sheen is a real gradient masked by the glyphs: drawn with Skia on iOS and Android and with CSS background-clip: text on the web.

When to use

  • One premium or celebratory phrase: an upgrade, a reward, a limited offer.
  • Short, single-line labels and headlines.

When not to use

  • Body text or several lines. ShineText draws a single line.
  • More than one shining element on screen; the effect only works when it is rare.

Notes

  • fontFamily defaults to the system sans-serif; pass a family that is installed on the device (or loaded in the app) for custom type.
  • Between sweeps (pause) nothing animates. Pass active={false} while off-screen.
  • If no matching font is available the component falls back to plain text.

Props

ShineTextProps

PropTypeDefaultDescription
textrequiredstring—Single line of text.
fontSizenumber36Font size in pt. Defaults to 36.
fontWeightTextStyle['fontWeight']'800'Defaults to '800'.
fontFamilystring—Font family. Defaults to the system sans-serif.
colorstring—Base text colour. Defaults to the theme textMuted.
shineColorstring—Colour of the sheen. Defaults to the theme highlight.
durationnumber1800Time for one sweep, in ms. Defaults to 1800.
pausenumber1400Rest between sweeps, in ms. Defaults to 1400.
activebooleantrueStop sweeping, e.g. while off-screen. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Native: one text draw with a moving gradient per frame while sweeping; idle between sweeps. Web: a CSS animation.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.60× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 155 MB app memory. Sweeps by design while active; pass active={false} to stop.

Real-device measurement pending.

Accessibility

Reduced motion
Plain text in the base colour, no sheen.
Screen readers
Exposed as a single text element with the full string.
Touch target
Not interactive.

Source files

components/kinetik/shine-text.tsx is in the Code tab of the preview above.