This is a simple single Svelte component to help create a calendar month view. It's not headless, but allows you to pass the date cell as a slot, for more flexibility of how and what each cell displays.
Depends on date-fns.
Look at src/routes/+page.svelte
for usage, and src/lib/Calendar.svelte
for implementation. Feel free to copy this code to you own project, since I didn't bother publishing it to npm as a package.
- start_on_sunday boolean
- starts a week on sunday instead of monday, false by default
- view_date Date
- sets the month the view starts in
- --header-margin
- --month-font-weight
- --month-font-size
- --week-days-color
- --week-days-font-weight
- --week-days-margin
- --cell-height