Kinetik UI

Beam Button

.md

A button with a beam of light running around its edge, leaving a soft glow that brightens on press.

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 beam-button

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/beam-button.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/beam-button.tsx
    View source files

Usage

import { BeamButton } from '@/components/kinetik/beam-button';

<BeamButton onPress={upgrade}>Upgrade to Pro</BeamButton>;

surface is a quiet dark button whose edge carries the light; ember is the filled primary. Pass an icon as leading, and beamColor to tint the light with your brand.

When to use

  • One action you want noticed without shouting: an upgrade, a new feature, an invitation.
  • Empty states and onboarding, where a little movement draws the eye to the next step.

When not to use

  • More than one per screen. Two moving beams compete for attention.
  • Routine actions in forms and lists. Use a plain button.

Notes

  • The beam runs on a frame callback on the UI thread and stops when the button is disabled.
  • The glow spreads 14 pt past the button; leave a little room around it.
  • With reduced motion the beam stays still and the press is a 1% press-in.

Props

BeamButtonProps

PropTypeDefaultDescription
childrenrequiredReactNode—Label. A string gets the variant's text style; any node is rendered as is.
onPress() => void—
leadingReactNode—Icon before the label.
variant'surface' | 'ember''surface'`surface` is quiet and dark; `ember` is the filled primary. Defaults to `surface`.
beamColorstring—Colour of the travelling light. Defaults to the strongest ink that reads on the variant.
lapnumber3.2Seconds for the light to go once around. Defaults to 3.2.
radiusnumber—Corner radius. Defaults to the theme `md` radius.
disabledbooleanfalse
hapticsbooleantrueA light tap on press. Defaults to true.
accessibilityLabelstring—Required when `children` is not a string.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One small Skia canvas; a frame callback advances the beam's angle on the UI thread. It stops while disabled or with reduced motion.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.35× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 157 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The beam holds still at the top left; the press still gives a 1% press-in.
Screen readers
Button role with disabled state; 'activate' presses it.
Touch target
52 pt tall and at least 104 pt wide.

Source files

components/kinetik/beam-button.tsx is in the Code tab of the preview above.