Kinetik UI

Tip Bubble

.md

A short tip that grows out of its anchor from the arrow's point and closes by itself after a few seconds.

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

Installation

Kinetik CLI
npx kinetik-ui add tip-bubble

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/tip-bubble.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/tip-bubble.tsx
    View source files

Usage

import { TipBubble } from '@/components/kinetik/tip-bubble';

<TipBubble
  content="Covers payment processing and support around the clock."
  accessibilityLabel="About the service fee"
>
  <InfoIcon />
</TipBubble>;

The children are the anchor. Pressing it opens the tip; it closes after duration (4 s by default) or on a second press.

When to use

  • A sentence of help beside a term, a fee or a setting that not everyone needs explained.
  • Explaining an icon-only control the first time someone meets it.

When not to use

  • Anything people must read to continue. Put it on the screen.
  • Long help or links. Use a sheet or a help page.

Notes

  • The bubble is drawn outside the anchor's box, so leave room above (or below, with placement="bottom") and avoid overflow: 'hidden' on its parents. The anchor's root has zIndex: 10 so the bubble draws over the rows that follow it.
  • align lines up the bubble's start, centre or end with the anchor, which keeps it on screen near an edge.
  • On Android, touches only reach a view inside its parent's box, so the bubble does not take presses. It closes from the anchor or by itself.
  • With reduced motion the bubble appears without scaling.

Props

TipBubbleProps

PropTypeDefaultDescription
contentrequiredstring—The tip itself. Keep it to a sentence or two.
childrenrequiredReactNode—The anchor the tip points at, e.g. an info icon or a short label.
accessibilityLabelrequiredstring—Names the anchor for screen readers, e.g. "About fees".
placement'top' | 'bottom''top'Above or below the anchor. Defaults to `top`.
align'start' | 'center' | 'end''center'Which edge of the bubble lines up with the anchor. Defaults to `center`.
openboolean—Controlled state. Leave unset to toggle on press.
onOpenChange(open: boolean) => void—
durationnumber4000Closes by itself after this many ms; 0 keeps it open. Defaults to 4000.
widthnumber220Bubble width. Defaults to 220.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One shared value; the bubble is mounted only while open or fading. Nothing runs at rest.
Measured

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

Real-device measurement pending.

Accessibility

Reduced motion
The bubble appears and disappears without scaling.
Screen readers
The anchor is a button with an expanded state and the hint "Shows a tip"; the tip is announced when it opens, so focus stays on the anchor.
Touch target
The anchor's box is grown by 14 pt on every side, to at least 44 pt, without moving the layout.

Source files

components/kinetik/tip-bubble.tsx is in the Code tab of the preview above.