u/BahrawyZ

Shadcn NextJs OpenSource Calender
▲ 7 r/nextjs

Shadcn NextJs OpenSource Calender

Been working on a productivity app for a while and needed a calendar. Tried a few existing ones, got frustrated, ended up building my own. It got big enough that I pulled it out into its own package.

https://preview.redd.it/bnj6rpt8mo1h1.png?width=1919&format=png&auto=webp&s=971ec17e7696608364a25e0a4cb1a0376b3b6ba1

It's called bahrawy-calendar. Month, week, and day views. Recurring events with actual RFC 5545 support (not some half-baked "repeat every week" thing). Drag and drop. Conflict detection. Google Calendar, Outlook, and Apple Calendar overlays where the OAuth flow is handled for you.

If you use shadcn, you can grab it in one command:

npx shadcn@latest add "https://raw.githubusercontent.com/bahrawyX/bahrawys-calender/main/registry/bahrawy-calendar.json"

That drops a styled component into your components/ui/ using your existing shadcn primitives. Or just npm install bahrawy-calendar if you want the headless version.

The thing I'm most happy with is the architecture. You can either use <BahrawyCalendar /> as a drop-in (renders everything, zero config) or use the provider + Zustand stores directly and build your own UI from scratch. Same stores, same logic, your layout.

Some stuff worth mentioning:

  • Keyboard first. N = new event, T = today, M/W/D = switch views, arrows = navigate, Ctrl+Z = undo
  • Persistence is an adapter pattern. Ships with localStorage, but you can swap in Supabase or whatever in like 10 lines
  • Recurrence uses rrule as an optional peer dep. If you don't need recurring events, you don't pay for it
  • TypeScript, tree-shakable, ESM + CJS

It's not perfect. The drag and drop could be smoother, and I want to add multi-day events that span across rows in month view. But it works, I use it daily in my own app, and I figured other people might find it useful too.

npm: https://www.npmjs.com/package/bahrawy-calendar

GitHub: https://github.com/bahrawyX/bahrawys-calender

Link: https://bahrawys-calender.vercel.app/

free to use

reddit.com
u/BahrawyZ — 5 days ago
▲ 7 r/shadcn

Shadcn NextJs OpenSource XC

Been working on a productivity app for a while and needed a calendar. Tried a few existing ones, got frustrated, ended up building my own. It got big enough that I pulled it out into its own package.

It's called bahrawy-calendar. Month, week, and day views. Recurring events with actual RFC 5545 support (not some half-baked "repeat every week" thing). Drag and drop. Conflict detection. Google Calendar, Outlook, and Apple Calendar overlays where the OAuth flow is handled for you.

If you use shadcn, you can grab it in one command:

npx shadcn@latest add "https://raw.githubusercontent.com/bahrawyX/bahrawys-calender/main/registry/bahrawy-calendar.json"

That drops a styled component into your components/ui/ using your existing shadcn primitives. Or just npm install bahrawy-calendar if you want the headless version.

The thing I'm most happy with is the architecture. You can either use <BahrawyCalendar /> as a drop-in (renders everything, zero config) or use the provider + Zustand stores directly and build your own UI from scratch. Same stores, same logic, your layout.

Some stuff worth mentioning:

  • Keyboard first. N = new event, T = today, M/W/D = switch views, arrows = navigate, Ctrl+Z = undo
  • Persistence is an adapter pattern. Ships with localStorage, but you can swap in Supabase or whatever in like 10 lines
  • Recurrence uses rrule as an optional peer dep. If you don't need recurring events, you don't pay for it
  • TypeScript, tree-shakable, ESM + CJS

It's not perfect. The drag and drop could be smoother, and I want to add multi-day events that span across rows in month view. But it works, I use it daily in my own app, and I figured other people might find it useful too.

npm: https://www.npmjs.com/package/bahrawy-calendar

GitHub: https://github.com/bahrawyX/bahrawys-calender

https://preview.redd.it/6jjv1lhylo1h1.png?width=1919&format=png&auto=webp&s=6c3ffc269e1426dccdbbdce44fcecbb78e05688b

Would love feedback. If you try it and something breaks or feels off, open an issue. Still actively working on it.

reddit.com
u/BahrawyZ — 5 days ago