Kinetik UI

Pop Dialog

.md

A dialog that rises and settles on a soft spring over a dimmed screen, and sinks back before it unmounts.

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

Installation

Kinetik CLI
npx kinetik-ui add pop-dialog

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/pop-dialog.json

Install manually

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

Usage

import { PopDialog } from '@/components/kinetik/pop-dialog';

<PopDialog
  visible={open}
  onClose={() => setOpen(false)}
  title="Leave Weekend Hikers?"
  message="You will stop getting messages from this group."
  actions={[
    { label: 'Stay', onPress: () => setOpen(false) },
    { label: 'Leave', tone: 'danger', onPress: leave },
  ]}
/>;

When to use

  • A decision that must be made before going on: discarding changes, leaving a group, deleting something.
  • Short confirmations with two or three clear choices.

When not to use

  • Information that needs no decision. Use a toast or Notice Bar.
  • Long forms or content. Use a sheet or a new screen.

Notes

  • visible controls it; the dialog stays mounted until its exit animation finishes, so closing never cuts it off.
  • Back on Android, a tap outside (unless dismissable is false) and the screen reader escape gesture call onClose.
  • Two actions sit side by side; three or more are stacked. Name actions with verbs ("Leave", "Delete"), not "OK".
  • With reduced motion it appears and disappears without moving.

Props

PopDialogProps

PropTypeDefaultDescription
visiblerequiredboolean—
onCloserequired() => void—Called for a tap outside, Back on Android and the screen reader escape gesture.
titlerequiredstring—
actionsrequiredreadonly PopDialogAction[]—One to three actions; two sit side by side, more are stacked.
messagestring—
childrenReactNode—Extra content between the message and the actions.
dismissablebooleantrueA tap outside closes it. Defaults to true.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
A transparent modal of plain views; the scrim and card read one shared value. Nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.00× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 144 MB app memory. p99 spikes are the first frame of the modal window opening.

Real-device measurement pending.

Accessibility

Reduced motion
The dialog appears and disappears without moving.
Screen readers
A modal window with a heading and named action buttons; the escape gesture and Back close it.
Touch target
Actions are at least 48 pt tall; outside the card is one large close target.

Source files

components/kinetik/pop-dialog.tsx is in the Code tab of the preview above.