List Paste

List Paste is a copy-paste React component that stops messy pasted list imported 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/list-paste
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

StopsMessy pasted list imported

Was this component page useful?

How do I install List Paste?

pnpm dlx shadcn@latest add @bollard/list-paste

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

How do I use List Paste in React?

list-paste-usage.tsx
import { ListPaste } from "@/components/ui/list-paste"

<ListPaste label="Invite teammates" defaultValue={pasted} onImport={setSent} importLabel="Send {count} invites" />

What input mistakes does List Paste catch?

  • Items split wrongly by commas inside quoted names
  • Duplicates, by a compare key you choose
  • Invalid items with their line and reason
  • Invisible characters and Name <email> wrappers stripped

What props does List Paste accept?

ListPaste props
PropTypeDefault
label

Visible label.

string"Paste a list"
value

Controlled text.

string—
defaultValue

Initial text when uncontrolled.

string""
onValueChange

Called with the text on every change, including one-tap clean-ups.

(value: string) => void—
validate

Checks one item. Defaults to an email check.

ListValidatoremailValidator
compareKey

Maps an item to the key used to spot duplicates. Defaults to lowercase.

(value: string) => string—
onImport

Receives the valid, de-duplicated items. Omit to hide the import button.

(items: string[]) => void—
maxProblems

Most problem lines listed before "and N more".

number4
importLabel

Import button label; `{count}` is filled in.

string"Import {count}"
validLabel

Count labels; `{count}` is filled in and `(s)` is dropped for one.

string"{count} valid"
duplicatesLabel

Label of the duplicate count.

string"{count} duplicate(s)"
invalidLabel

Label of the invalid count.

string"{count} invalid"
removeLabel

Label of the one-tap clean-up buttons.

string"Remove"
undoLabel

Label of the button that restores the text before a clean-up.

string"Undo"

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

How is List Paste accessible?

  • Visible label; textarea is described by a polite summary region
  • Remove buttons have aria-labels with the count they remove
  • Undo is a real button; 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?

  • Default email check is pragmatic (one @, dotted domain, no spaces), not full RFC 5322 or a deliverability check
  • Shows only the first problems (maxProblems)

What expensive mistakes does List Paste stop?

Messy pasted list imported

Also known as

bulk invite · paste emails · invite members · list import · csv paste · comma separated · team invite · recipients

Field type

What dependencies does List Paste require?

List Paste facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameList Paste
Registry identifier@bollard/list-paste
Install commandnpx shadcn@latest add @bollard/list-paste
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-10-16
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 List Paste

What form validation mistake does List Paste catch?

List Paste prevents messy pasted list imported. Splits a pasted list of emails or names, counts valid, duplicate and invalid items, and removes the bad ones before you import or invite. Catches: Items split wrongly by commas inside quoted names, Duplicates, by a compare key you choose, Invalid items with their line and reason, Invisible characters and Name <email> wrappers stripped. Limitation: validate list-paste schemas on backend.

How do I install list-paste with shadcn?

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

What props customize List Paste?

List Paste accepts `label`, `value`, `defaultValue`, `onValueChange`, `validate`. Configures bulk invite, paste emails, invite members behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of list-paste?

Default email check is pragmatic (one @, dotted domain, no spaces), not full RFC 5322 or a deliverability check. Shows only the first problems (maxProblems) Server requirement: backend verification for list-paste.

How does List Paste meet accessibility guidelines?

Visible label; textarea is described by a polite summary region. Remove buttons have aria-labels with the count they remove. Undo is a real button; icons are aria-hidden. Minimizes errors: paste list of emails, bulk invite invalid emails.

Which components pair with List Paste?