PromptDialog

Prompt modal for user text input. Animated with Framer Motion, supports Enter to submit and Escape to cancel.

API Reference

PropTypeDefaultDescription
isOpen*booleanWhether the dialog is open
title*stringDialog title
placeholderstringInput placeholder
defaultValuestringDefault input value
confirmTextstring"OK"Confirm button text
cancelTextstring"Cancel"Cancel button text
onConfirm*(value: string) => voidCalled with input value on confirm
onCancel*() => voidCalled on cancel

Source Code