Data

Recurrence editor.

Review finite repeat rules, exact instants and occurrence exceptions.

LIVE PREVIEWTry it. It works.

Install the source

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/recurrence-editor.json

Registry setup · Examples · API and behavior · Open the playground

COMPLETE EXAMPLES

Use it in context.

Each example includes its imports, data and state. The preview runs that same source. Include the stylesheet once in your application.

Finite repeats across a time-zone transition

Stage a daily or weekly rule, inspect exact UTC instants and local offsets, then apply or discard it. The local reference source keeps revisions separate from the draft.

Keyboard

  • Use native field editing and Select keyboard navigation. Weekly choices use Tab and Space.
  • Apply validates the complete finite rule and focuses a linked error. Escape or Cancel discards the staged change.
  • The original wall-clock time and explicit DST policy determine each instant; no browser-zone conversion is inferred.

States covered

  • Daily and weekly
  • Count or inclusive until date
  • Explicit IANA zone
  • DST disambiguation
  • Staged Apply/Cancel
  • Read only
  • Scoped RTL

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-recurrence-finite-rule.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import {useMemo,useState} from 'react';
import {Button,Checkbox,RecurrenceEditor,createMemoryRecurrenceSource,type RecurrenceSeries,type RecurrenceSource,UIProvider} from '@bld8/ui';
const initial:RecurrenceSeries={id:'review-series',revision:1,title:'Interface review',resourceId:'room-a',rule:{frequency:'daily',interval:1,startDate:'2026-10-01',time:'09:00',timeZone:'Australia/Melbourne',durationMinutes:45,count:5,disambiguation:'reject'},exceptions:[]};
export default function FiniteRecurrenceExample(){const store=useMemo(()=>createMemoryRecurrenceSource(initial),[]),[series,setSeries]=useState(initial),[readOnly,setReadOnly]=useState(false),[arabic,setArabic]=useState(false),[attempts,setAttempts]=useState(0);const source=useMemo<RecurrenceSource>(()=>({load:()=>store.load(),save:async(request,context)=>{setAttempts(value=>value+1);return store.save(request,context);}}),[store]);return <UIProvider locale={arabic?'ar':'en-AU'} direction={arabic?'rtl':'ltr'} messages={arabic?{'recurrence.scope':'نطاق التعديل','recurrence.entire':'السلسلة كاملة','recurrence.one':'موعد واحد','recurrence.rule':'قاعدة التكرار','recurrence.frequency':'التواتر','recurrence.daily':'يومي','recurrence.weekly':'أسبوعي','recurrence.every':'التكرار كل','recurrence.firstDate':'التاريخ الأول','recurrence.wallTime':'وقت البدء المحلي','recurrence.zone':'المنطقة الزمنية','recurrence.duration':'دقائق منقضية','recurrence.dst':'الأوقات المحلية المتكررة أو المفقودة','recurrence.end':'نهاية السلسلة','recurrence.byCount':'بعد عدد من المواعيد','recurrence.byDate':'حتى تاريخ','recurrence.count':'عدد المواعيد الأساسية','recurrence.preview':'معاينة المواعيد','recurrence.apply':'تطبيق التغيير','recurrence.cancel':'إلغاء المسودة'}:{}}><div style={{display:'grid',gap:24,maxWidth:900}}>
  <div style={{display:'flex',gap:16,flexWrap:'wrap'}}><Checkbox label="Read-only recurrence" checked={readOnly} onCheckedChange={setReadOnly}/><Button variant="ghost" onClick={()=>setArabic(value=>!value)}>{arabic?'Use English recurrence':'Use Arabic recurrence'}</Button></div>
  <RecurrenceEditor label="Review recurrence" series={series} source={source} onSeriesChange={setSeries} readOnly={readOnly} resources={[{id:'room-a',label:'Review room'}]}/><p className="bui-hint" data-recurrence-host>{'Host revision: '+series.revision+' | Save attempts: '+attempts}</p>
</div></UIProvider>;}

One occurrence, revision conflicts and uncertain saves

Skip or override one original occurrence using explicit instants. An authored acknowledgement-loss and concurrent-change fixture demonstrates same-ID retry, receipt reconciliation and deliberate rebase.

Keyboard

  • Choose One occurrence, its original date and Skip or Override. Apply sends one explicitly scoped change.
  • An uncertain response locks editing. Retry same request or Check request receipt resolves the original identity.
  • A revision conflict preserves the draft. Review against the latest snapshot before applying again.

States covered

  • Occurrence or series scope
  • Explicit UTC overrides
  • Resource override
  • Lost acknowledgement
  • Same-ID retry
  • Receipt reconciliation
  • Concurrent revision
  • Stale supplied snapshot

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-recurrence-occurrence-receipts.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import {useMemo,useRef,useState} from 'react';
import {Button,Checkbox,RecurrenceEditor,createMemoryRecurrenceSource,type RecurrenceSeries,type RecurrenceSource,type RecurrenceSaveResult,UIProvider} from '@bld8/ui';
const initial:RecurrenceSeries={id:'weekly-review',revision:1,title:'Weekly interface review',resourceId:'room-a',rule:{frequency:'weekly',interval:1,weekdays:[1],startDate:'2026-11-02',time:'09:00',timeZone:'UTC',durationMinutes:60,count:4,disambiguation:'reject'},exceptions:[]};
export default function OccurrenceReceiptExample(){const store=useMemo(()=>createMemoryRecurrenceSource(initial),[]),receipts=useRef(new Map<string,RecurrenceSaveResult>()),[series,setSeries]=useState(initial),[lose,setLose]=useState(false),[invalid,setInvalid]=useState(false),[staleLoad,setStaleLoad]=useState(false),[requests,setRequests]=useState<string[]>([]),[remoteRevision,setRemoteRevision]=useState(1);const flags=useRef({lose,invalid,staleLoad});flags.current={lose,invalid,staleLoad};const source=useMemo<RecurrenceSource>(()=>({load:()=>flags.current.staleLoad?initial:store.load(),receipt:async(id,{signal})=>signal.aborted?null:receipts.current.get(id)??null,save:async(request,context)=>{setRequests(values=>[...values,request.requestId]);const result=await store.save(request,context);if(result.ok){receipts.current.set(request.requestId,structuredClone(result));setRemoteRevision(store.load().revision);if(flags.current.lose){flags.current.lose=false;setLose(false);throw Error('The local acknowledgement was lost.');}if(flags.current.invalid){flags.current.invalid=false;setInvalid(false);return {...result,requestId:'mismatched-receipt'};}}return result;}}),[store]);
  async function advance(){const current=store.load(),result=await store.save({requestId:'external-'+crypto.randomUUID(),change:{scope:'series',seriesId:current.id,expectedRevision:current.revision,rule:{...current.rule,durationMinutes:current.rule.durationMinutes+5}}},{signal:new AbortController().signal});if(result.ok)setRemoteRevision(result.series.revision);}
  return <UIProvider><div style={{display:'grid',gap:24,maxWidth:900}}><div style={{display:'grid',gap:12}}><Checkbox label="Lose next recurrence acknowledgement" checked={lose} onCheckedChange={setLose}/><Checkbox label="Return a mismatched next receipt" checked={invalid} onCheckedChange={setInvalid}/><Checkbox label="Return stale source snapshot on load" checked={staleLoad} onCheckedChange={setStaleLoad}/><div style={{display:'flex',gap:12,flexWrap:'wrap'}}><Button variant="secondary" onClick={()=>void advance()}>Advance source revision</Button><Button variant="ghost" onClick={()=>setSeries(store.load())}>Supply current source snapshot</Button></div></div>
    <RecurrenceEditor label="Occurrence editor" series={series} source={source} onSeriesChange={setSeries} resources={[{id:'room-a',label:'Review room'},{id:'room-b',label:'Quiet room'}]}/>
    <p className="bui-hint" data-recurrence-revisions>{'Host revision: '+series.revision+' | Source revision: '+remoteRevision}</p><p className="bui-hint" data-recurrence-attempts>{'Attempts: '+requests.length}</p><output data-recurrence-request-ids style={{overflowWrap:'anywhere'}}>{requests.join(' | ')}</output>
    <p className="bui-hint">Local reference data only. A production service owns authorization, atomic revisions and durable receipts.</p>
  </div></UIProvider>;}

Quick reference

React / TypeScript
<RecurrenceEditor series={series} source={source} />

In the workspace or ZIP starter, import components from @bld8/ui and include @bld8/ui/styles.css once. Registry installations use your local bld8/ source path. Wrap overlays in UIProvider.

API & behaviour

Daily/weekly civil recurrence uses an explicit IANA zone and reject/earlier/later DST policy. Count or until bounds, stable occurrence identities, skip/override exceptions and occurrence-versus-series changes are explicit. Durations use elapsed minutes. Requests use revisions and idempotency receipts; durable storage and authorization belong to the host.

RecurrenceEditor

RecurrenceEditor public properties
PropTypeDefault
seriesRequiredRecurrenceSeries—
classNamestring | undefined—
disabledboolean | undefinedfalse
labelstring | undefined'Repeat schedule'
onSeriesChange((series: RecurrenceSeries) => void) | undefined—
previewLimitnumber | undefined

At most 24 rows are shown. Expansion is still checked against the full finite rule.

8
readOnlyboolean | undefinedfalse
resourcesreadonly { id: string; label: string; }[] | undefined[]
sourceRecurrenceSource | undefined—
timeZonesreadonly string[] | undefined[]

RecurrenceEditorProps

RecurrenceEditorProps public properties
PropTypeDefault
seriesRequiredRecurrenceSeries—
classNamestring | undefined—
disabledboolean | undefined—
labelstring | undefined—
onSeriesChange((series: RecurrenceSeries) => void) | undefined—
previewLimitnumber | undefined

At most 24 rows are shown. Expansion is still checked against the full finite rule.

—
readOnlyboolean | undefined—
resourcesreadonly { id: string; label: string; }[] | undefined—
sourceRecurrenceSource | undefined—
timeZonesreadonly string[] | undefined—

RecurrenceRule

RecurrenceRule public properties
PropTypeDefault
disambiguationRequired"reject" | "earlier" | "later"—
durationMinutesRequirednumber—
frequencyRequired"daily" | "weekly"—
intervalRequirednumber—
startDateRequiredstring—
timeRequiredstring—
timeZoneRequiredstring—
countnumber | undefined—
untilstring | undefined—
weekdaysreadonly number[] | undefined—

RecurrenceSeries

RecurrenceSeries public properties
PropTypeDefault
exceptionsRequiredreadonly RecurrenceException[]—
idRequiredstring—
resourceIdRequiredstring—
revisionRequirednumber—
ruleRequiredRecurrenceRule—
titleRequiredstring—

RecurrenceException

{date:string;kind:'skip'}|{date:string;kind:'override';start:string;end:string;resourceId?:string}

RecurrenceException public properties
PropTypeDefault
dateRequiredstring—
kindRequired"skip" | "override"—

RecurrenceOccurrence

RecurrenceOccurrence public properties
PropTypeDefault
dateRequiredstring—
endRequiredstring—
idRequiredstring—
offsetRequiredstring—
overriddenRequiredboolean—
resourceIdRequiredstring—
seriesIdRequiredstring—
startRequiredstring—
timeZoneRequiredstring—
titleRequiredstring—

RecurrenceChange

{seriesId:string;expectedRevision:number;scope:'series';rule:RecurrenceRule}|{seriesId:string;expectedRevision:number;scope:'occurrence';exception:RecurrenceException}

RecurrenceChange public properties
PropTypeDefault
expectedRevisionRequirednumber—
scopeRequired"series" | "occurrence"—
seriesIdRequiredstring—

RecurrenceRequest

RecurrenceRequest public properties
PropTypeDefault
changeRequiredRecurrenceChange—
requestIdRequiredstring—

RecurrenceSaveResult

{ok:true;requestId:string;series:RecurrenceSeries}|{ok:false;code:'conflict';series:RecurrenceSeries;message:string}|{ok:false;code:'validation';message:string}

RecurrenceSaveResult public properties
PropTypeDefault
okRequiredboolean—

RecurrenceSource

RecurrenceSource public properties
PropTypeDefault
saveRequired(request: RecurrenceRequest, context: { signal: AbortSignal; }) => Promise<RecurrenceSaveResult>—
load((context: { signal: AbortSignal; }) => RecurrenceSeries | Promise<RecurrenceSeries>) | undefined—
receipt((requestId: string, context: { signal: AbortSignal; }) => Promise<RecurrenceSaveResult | null>) | undefined

A null receipt is not proof that a request was not applied.

—

Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.

Related controls

Notes to self

Test this component with real content, keyboard input and both themes. The example is a starting point; labels, error handling and behaviour still need to fit the application.