Kinetik UI

Pulse Toggle

.md

A switch whose thumb stretches mid-flight, lands as a rounded square and pulses when it turns on.

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

Installation

Kinetik CLI
npx kinetik-ui add pulse-toggle

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/pulse-toggle.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/pulse-toggle.tsx
    View source files

Usage

import { PulseToggle } from '@/components/kinetik/pulse-toggle';

const [enabled, setEnabled] = useState(false);

<PulseToggle
  label="Release alerts"
  description="A nudge when a new build is ready"
  value={enabled}
  onValueChange={setEnabled}
/>;

With a label the whole row is the touch target and stretches to its container. Without one, give it an accessibilityLabel.

When to use

  • Settings that take effect immediately.
  • Places where a little personality is welcome: onboarding, preferences, playful products.

When not to use

  • Choices that only apply after a Save button. Use a checkbox.
  • More than two states. Use a segmented control.

Notes

  • activeColor changes the on colour per toggle; the thumb is always the theme highlight when on.
  • The pulse ring only plays when the user turns the switch on, not on first render.

Props

PulseToggleProps

PropTypeDefaultDescription
valuerequiredboolean—
onValueChangerequired(value: boolean) => void—
labelstring—Visible label. Tapping it toggles too. Also used as the accessibility label.
accessibilityLabelstring—Accessibility label when there is no visible label.
descriptionstring—Secondary line under the label.
disabledbooleanfalse
activeColorstring—Track colour when on. Defaults to the theme ember.
sizePulseToggleSize'md'Defaults to `md`.
hapticsbooleantruePlays a light tap when toggled. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One spring and one 480 ms ring timing per toggle; nothing runs at rest.
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 · 154 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
Thumb slides with a short timing; no stretch and no pulse ring.
Screen readers
Switch role with checked and disabled states; the visible label is the accessible name.
Touch target
Row is at least 44 pt tall; a bare toggle gets an 8 pt hit slop.

Source files

components/kinetik/pulse-toggle.tsx is in the Code tab of the preview above.