Unsent Marker

Unsent Marker is a copy-paste React component that stops thought i replied but never sent it before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/unsent-marker
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsThought I replied but never sent it

Was this component page useful?

How do I install Unsent Marker?

pnpm dlx shadcn@latest add @bollard/unsent-marker

The files land in your project. They're yours to edit.

How do I use Unsent Marker in React?

unsent-marker-usage.tsx
import { clearUnsent, readUnsent, saveUnsent, UnsentMarker, useUnsentDraft, type UnsentDraft } from "@/components/ui/unsent-marker"

<UnsentMarker
  text={draft.text}
  at={draft.at}
  recipient={CHATS[chat].name}
  onSend={async (text) => {
    await new Promise((resolve) => setTimeout(resolve, 400))
    send(text)
  }}
  onEdit={(text) => {
    setValue(text)
    clear()
  }}
  onDiscard={clear}
/>

What input mistakes does Unsent Marker catch?

  • Text left in the composer and never sent
  • Who hasn't received it
  • Accidental discard (two taps)
  • Send failures, with an error

What props does Unsent Marker accept?

UnsentMarker props
PropTypeDefault
text* (required)

The unsent text.

string—
at

When it was last typed (ms).

number—
variant

`bubble` sits in the thread where the reply would be; `row` is a one-line preview for conversation lists.

"bubble" | "row""bubble"
recipient

Who it was meant for, e.g. "Priya".

string—
onSend

Sends it now. Return a promise to show a pending state; a rejection keeps the marker with an error.

(text: string) => void | Promise<void>—
onEdit

Moves it back into the composer.

(text: string) => void—
onDiscard

Throws it away (asks once).

() => void—
notSentLabel

Label on the unsent bubble.

string"Not sent"
typedText

`{when}` is filled in.

string"Typed {when}."
recipientText

`{recipient}` is filled in.

string"{recipient} hasn't received it."
privateText

Used when there's no `recipient`.

string"Only you can see it."
sendLabel

Label of the Send button.

string"Send"
editLabel

Label of the Edit button.

string"Edit"
discardLabel

Label of the Discard button.

string"Discard"
confirmDiscardLabel

Label of the second Discard tap.

string"Discard draft?"
failedText

Shown when sending fails.

string"Couldn't send. Check your connection and try again."

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Unsent Marker accessible?

  • Bubble is a labelled group including the text
  • Send failures use role=alert
  • Buttons have text labels; icons are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Drafts are kept where your useUnsentDraft storage keeps them (per device)
  • Doesn't know about sends from other devices unless you clear the draft

What expensive mistakes does Unsent Marker stop?

Thought I replied but never sent it

Also known as

draft · unsent · chat · reply · message composer · whatsapp · inbox · conversation list

Field type

What dependencies does Unsent Marker require?

Unsent Marker facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameUnsent Marker
Registry identifier@bollard/unsent-marker
Install commandnpx shadcn@latest add @bollard/unsent-marker
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-11-15
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Unsent Marker

What form validation mistake does Unsent Marker catch?

Unsent Marker prevents thought I replied but never sent it. Brings a typed-but-never-sent message back as a clear "Not sent" bubble, so people don't think they replied. Catches: Text left in the composer and never sent, Who hasn't received it, Accidental discard (two taps), Send failures, with an error. Limitation: validate unsent-marker schemas on backend.

How do I install unsent-marker with shadcn?

Run `npx shadcn@latest add @bollard/unsent-marker`. Sources added: registry/default/unsent-marker/unsent-marker.tsx. Package requirements: lucide-react.

What props customize Unsent Marker?

Unsent Marker accepts `text`, `at`, `variant`, `recipient`, `onSend`. Configures draft, unsent, chat behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of unsent-marker?

Drafts are kept where your useUnsentDraft storage keeps them (per device). Doesn't know about sends from other devices unless you clear the draft Server requirement: backend verification for unsent-marker.

How does Unsent Marker meet accessibility guidelines?

Bubble is a labelled group including the text. Send failures use role=alert. Buttons have text labels; icons are aria-hidden. Minimizes errors: forgot to hit send, draft never sent.

Which components pair with Unsent Marker?