New Content Pill

New Content Pill is a copy-paste React component that stops feed jumped while i was tapping 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/new-content-pill
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

StopsFeed jumped while I was tapping

Was this component page useful?

How do I install New Content Pill?

pnpm dlx shadcn@latest add @bollard/new-content-pill

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

What input mistakes does New Content Pill catch?

  • Posts shifting under a tap when new items arrive
  • Reader losing their place mid-feed
  • Inserts directly when the reader is already at the top

What props does New Content Pill accept?

NewContentPill props
PropTypeDefault
items* (required)

The live list, newest first. New items arrive at the start.

T[]—
getKey* (required)

A stable key for each item.

(item: T) => string—
renderItem* (required)

Renders one item.

(item: T, index: number) => React.ReactNode—
label

Pill text. `{count}` is filled in.

string"{count} new posts"
labelOne

Pill text for a single new item.

string"1 new post"
topThreshold

Within this many pixels of the top counts as "at the top", where new items go straight in.

number8
scrollTarget

What scrolls. "self" (default) makes this element the scroll box. "window" is for feeds where the whole page scrolls; a function returns another scrolling ancestor (an app shell's main panel).

"self" | "window" | (() => HTMLElement | null)"self"
topOffset

Height of a sticky header over the feed when the page or an ancestor scrolls. The pill sits below it.

number0

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

How is New Content Pill accessible?

  • Pill is a button; the count is announced via role=status
  • After tapping, focus moves to the first feed item without scrolling past it
  • Smooth scroll and the pill animation are skipped under reduced motion

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

What are the limitations and server boundaries?

  • Assumes a newest-first list where new items arrive at the start
  • Needs a stable key per item (getKey)
  • Doesn't virtualise long lists

What expensive mistakes does New Content Pill stop?

Feed jumped while I was tapping

Also known as

new posts · feed · timeline · infinite scroll · live updates · chat · layout shift · pill

What dependencies does New Content Pill require?

New Content Pill facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameNew Content Pill
Registry identifier@bollard/new-content-pill
Install commandnpx shadcn@latest add @bollard/new-content-pill
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 New Content Pill

What form validation mistake does New Content Pill catch?

New Content Pill prevents feed jumped while I was tapping. Holds new feed items behind a "5 new posts" pill, so the feed doesn't jump under the reader's finger while they read or tap. Catches: Posts shifting under a tap when new items arrive, Reader losing their place mid-feed, Inserts directly when the reader is already at the top. Limitation: validate new-content-pill schemas on backend.

How do I install new-content-pill with shadcn?

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

What props customize New Content Pill?

New Content Pill accepts `items`, `getKey`, `renderItem`, `label`, `labelOne`. Configures new posts, feed, timeline behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of new-content-pill?

Assumes a newest-first list where new items arrive at the start. Needs a stable key per item (getKey). Doesn't virtualise long lists Server requirement: backend verification for new-content-pill.

How does New Content Pill meet accessibility guidelines?

Pill is a button; the count is announced via role=status. After tapping, focus moves to the first feed item without scrolling past it. Smooth scroll and the pill animation are skipped under reduced motion. Minimizes errors: feed shifted under finger, tapped wrong post.

Which components pair with New Content Pill?