Recurrence Scope

Recurrence Scope is a copy-paste React component that stops edited whole series instead of one 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/recurrence-scope
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

StopsEdited whole series instead of one

Was this component page useful?

How do I install Recurrence Scope?

pnpm dlx shadcn@latest add @bollard/recurrence-scope

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

How do I use Recurrence Scope in React?

recurrence-scope-usage.tsx
import { RecurrenceScope, type Occurrence } from "@/components/ui/recurrence-scope"

<RecurrenceScope
  title="Team stand-up"
  occurrences={occurrences}
  editingId="2026-10-20"
  changes={["time"]}
  fieldLabels={{ time: "start time", title: "title" }}
  continues
  today="2026-10-13"
  defaultValue="following"
  onCancel={() => {}}
  onConfirm={() => new Promise((resolve) => setTimeout(resolve, 600))}
/>

What input mistakes does Recurrence Scope catch?

  • Exactly which occurrences each scope touches, with a count
  • Past occurrences included in the change
  • Occurrences with their own edits that would be overwritten, by date and field
  • A repeat-rule change, which regenerates (and overwrites) the whole affected range
  • Option to keep individually edited occurrences

What props does Recurrence Scope accept?

RecurrenceScope props
PropTypeDefault
title* (required)

Name of the event or task, e.g. "Team stand-up".

string—
occurrences* (required)

The series' occurrences in order (a finite window is fine; see `continues`).

Occurrence[]—
editingId* (required)

The occurrence the user opened.

string—
changes* (required)

Fields being changed, e.g. `["time"]`. Include `"repeat"` when the rule itself changes.

string[]—
fieldLabels

Words for fields in the warning, e.g. `{ time: "time", title: "title" }`.

Record<string, string>{}
continues

The series carries on after the last listed occurrence (no end date).

booleanfalse
today

"Today" as `YYYY-MM-DD`, to call out past occurrences. Defaults to the local date once mounted.

string—
value

Controlled scope.

RecurrenceScopeValue—
defaultValue

Initial scope when uncontrolled. Defaults to the safest, "this".

RecurrenceScopeValue"this"
onValueChange

Called when the scope changes.

(scope: RecurrenceScopeValue) => void—
onConfirm

Save. `skip` lists occurrences whose own edits should be kept. May return a Promise.

(scope: RecurrenceScopeValue, detail: { ids: string[]; skip: string[] }) => void | Promise<unknown>—
onCancel

Close without saving.

() => void—
locale

Locale for dates.

string"en-IN"
scopeLabels

Option labels.

Record<RecurrenceScopeValue, string>{ this: "This one", following: "This and following", all:…
overwriteText

Templates: `{dates}` and `{fields}` are filled in.

string"{dates} {verb} edited on their own. Saving overwrites th…
keepLabel

Label of the button that keeps individually edited occurrences.

string"Keep their own changes"
cancelLabel

Label of the Cancel button.

string"Cancel"
saveLabel

Save button: `{count}` is filled in.

string"Save {count}"
messages

Override the readback and other small strings (see `RECURRENCE_MESSAGES`).

Partial<RecurrenceMessages>—

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

How is Recurrence Scope accessible?

  • Scope options are a radiogroup labelled by the title, built from labelled radio inputs
  • Changed dates list has an aria-label; changed/kept/unchanged state shown as text, not colour alone
  • Count and overwrite warning render in polite live regions
  • Save disables while pending, with an aria-hidden spinner

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

What are the limitations and server boundaries?

  • Works on the occurrences you pass in; it does not expand RRULEs itself
  • Does not save anything; onConfirm receives the choice

What expensive mistakes does Recurrence Scope stop?

Edited whole series instead of one

Also known as

recurring event · repeat · rrule · calendar · this event only · all events · google calendar · series

Field type

What dependencies does Recurrence Scope require?

Recurrence Scope facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameRecurrence Scope
Registry identifier@bollard/recurrence-scope
Install commandnpx shadcn@latest add @bollard/recurrence-scope
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 Recurrence Scope

How does Recurrence Scope handle date and time accuracy?

Recurrence Scope catches edited whole series instead of one. Validates calendar constraints: Exactly which occurrences each scope touches, with a count, Past occurrences included in the change, Occurrences with their own edits that would be overwritten, by date and field, A repeat-rule change, which regenerates (and overwrites) the whole affected range, Option to keep individually edited occurrences. Limitation: match recurrence-scope with server timezone.

How do I install recurrence-scope with shadcn?

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

What props customize Recurrence Scope?

Recurrence Scope accepts `title`, `occurrences`, `editingId`, `changes`, `fieldLabels`. Configures recurring event, repeat, rrule behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of recurrence-scope?

Works on the occurrences you pass in; it does not expand RRULEs itself. Does not save anything; onConfirm receives the choice Server requirement: backend verification for recurrence-scope.

How does Recurrence Scope meet accessibility guidelines?

Scope options are a radiogroup labelled by the title, built from labelled radio inputs. Changed dates list has an aria-label; changed/kept/unchanged state shown as text, not colour alone. Count and overwrite warning render in polite live regions. Save disables while pending, with an aria-hidden spinner. Minimizes errors: edited all events by mistake, this and following events.

Which components pair with Recurrence Scope?