185 Pro components and page blocks

Get Pro

Updated

Unsend Message

Pro

Preview

Customize

Accent
Duration620ms
Stagger22ms
Unsend window120s

Installation

Pro

Unsend Message is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/unsend-message

Usage

import { UnsendMessage } from "@/components/uibrik/unsend-message/unsend-message";​const defaultMessages = [  { id: "a", from: "them", text: "Are we still on for dinner tomorrow?" },  { id: "b", from: "me", text: "Yes! Booked a table at Nori" },  // …2 more];​<UnsendMessage  accent="#3b82f6"  duration={620}  stagger={22}  thread  unsendWindow={120}  placeholder="Message"  defaultMessages={defaultMessages}  onMessagesChange={(messages) => {}}  onSend={(message) => {}}  onUnsend={(message) => {}}  // messages={[{ id: "…", from: "me", text: "…" }]}  // aria-label="…"/>

Where to use Unsend Message

  • Messaging apps

    Unsend puts the text back in the box instead of deleting it, so fixing a typo takes one tap and a quick edit.

    Pairs with Chat Card and Reaction Bar

  • Support and AI chat

    Taking back a prompt before the reply arrives lets people reword it without retyping.

    Pairs with Streaming Chat and Prompt Input

  • Team chat and comments

    A time window limits unsending to fresh messages, matching how most chat products work.

Props

UnsendMessage
accent
Type string
"#3b82f6"
Your bubbles, the send button and the thread.
duration
Type number
620
How long each letter takes to fly.
stagger
Type number
22
Delay between neighbouring letters leaving.
thread
Type boolean
true
Draw the thread that joins the flying letters.
unsendWindow
Type number
120
Seconds a message can be unsent for. 0 means always.
placeholder
Type string
"Message"
Placeholder in the message box.
messages
Type { id: string; from: "me" | "them"; text: string; at?: number }[]
–
The thread. Pass with onMessagesChange to control it.
defaultMessages
Type UnsendChatMessage[]
–
Starting thread when uncontrolled.
onMessagesChange
Type (messages: UnsendChatMessage[]) => void
–
Called when a message is sent or unsent.
onSend
Type (message: UnsendChatMessage) => void
–
Called after you send a message.
onUnsend
Type (message: UnsendChatMessage) => void
–
Called once the letters have landed in the box.
ref
Type Ref<{ unsend(id: string): void; send(text: string): void }>
–
Drive it from code.
aria-label
Type string
"Conversation"
Accessible name for the thread.
className
Type string
–
Classes for the wrapper. Give it a height; the thread scrolls inside.