A modern, responsive horizontal calendar view built with SvelteKit 5 that displays a rolling 7-day view with today as the second column. Perfect for visualizing events from multiple ICS calendar feeds in a clean, organized layout.
Clone and install dependencies:
git clone <repository-url>
cd svelte-horizontal-calendar
npm install
Configure your calendars:
cp config.sample.json config.json
# Edit config.json with your ICS calendar URLs
Start the development server:
npm run dev
You can configure calendars in two ways:
Set the CONFIG
environment variable with your calendar configuration as JSON:
export CONFIG='{"calendars":[{"name":"Work Calendar","icsUrl":"https://your-calendar-provider.com/calendar.ics"},{"name":"Personal Events","icsUrl":"https://another-calendar.com/events.ics"}]}'
npm run dev
Create a config.json
file in the project root:
{
"calendars": [
{
"name": "Work Calendar",
"icsUrl": "https://your-calendar-provider.com/calendar.ics"
},
{
"name": "Personal Events",
"icsUrl": "https://another-calendar.com/events.ics"
}
]
}
Note: The environment variable takes precedence over the config file. If CONFIG
is set, the config file is not required.
Each calendar appears as a separate row in the horizontal layout.
npm run build
You can preview the production build with npm run preview
.
├── src/
│ ├── routes/
│ │ ├── +page.svelte # Main calendar component
│ │ └── api/calendars/ # ICS fetching API
│ └── lib/ # Shared utilities
├── config.json # Calendar configuration (your file)
├── config.sample.json # Example configuration
└── static/ # Static assets
MIT