← All components
Product stories / composition

Phone Chat

A complete pocket conversation with springing bubbles and playful local replies.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • All messages stay in local component state unless you provide an onSend integration. Reset or Replay cancels pending replies and restores the initial conversation.
  • The full phone chassis, composer, nine seed bubbles, quick replies, typing beats and380/28 bubble springs are retained.
  • The default blue, placeholder and caption are adjusted for readable text contrast. Keep sufficient contrast when choosing another accent.
  • Pause freezes pending replies and animation; reduced motion sends the canned reply immediately with no animation. Conversation history is bounded to 100 messages; text to 500 characters; chips to 20.
  • Reply delay is the base in milliseconds plus up to 800 ms random variation. A follow-up, when chosen, arrives after another 1600–2500ms.
  • The included Demo.tsx and styles recreate the complete preview.
React 19Framer Motion 12.42.2

Original interaction — Ashish Guleria · MIT. Complete copyright and license notice included.

Props

PropTypeDefaultDescription
contactNamestringeditorContact name
accentColorstring#006DE5Accent color
replyDelaynumber900Reply delay
followUpChancenumber0.25Follow-up chance
autoReplybooleantrueAutomatic replies
captionstring↑ type anything — they replyCaption
initialMessagesChatMessage[]nine example messagesInitial bubbles; each has from, text and optional id. A changed message list resets the conversation.
repliesstring[]sixteen short example repliesLocal replies selected at random.
quickRepliesstring[]six example repliesTap-to-send suggestion chips.
onSend(text: string) => voidundefinedOptional callback when the visitor sends a message. This component has no network integration.
classNamestring''Additional root classes.
pausedbooleanfalseFreeze animation and pending local playback.
replayTokennumber0Change this value to restart.