Install the package from the npm registry.
npm install add-to-calendar-buttonImport the module into the component, where you want to use the button.
import 'add-to-calendar-button';Start using it by adding a <add-to-calendar-button> tag to your HTML source code - with the options as attributes.
Yes, it is that simple.
Your code block could look like the following.
<add-to-calendar-button
name="Title"
options="'apple','google'"
location="World Wide Web"
start-date="2026-09-18"
end-date="2026-09-18"
start-time="10:15"
end-time="23:30"
time-zone="EST"
></add-to-calendar-button>The script ships with the "default" button style and the English language pack built in - so the button looks great and works out of the box without any extra configuration.
Every other style and language loads automatically on demand (a few KB each) the moment you reference it - no manual wiring needed.
When you bundle the script, import the style and language modules you need so they register fetch-free at build time. Simply add the corresponding import statements anywhere in your entry file (or the component that uses the button):
import 'add-to-calendar-button/styles/3d'; // any style besides "default"
import 'add-to-calendar-button/i18n/de'; // any language besides EnglishSee the "button-style" and "language" options at the Configuration page for the full picture.
The button can also pre-render a shell on the server for an instant, layout-stable first paint. See the "Server-side rendering" section on the advanced-use page. Server-side rendering
A full example could look like this.
<!-- +page.svelte (SvelteKit, SSR enabled) -->
<script>
import { atcb_generate_ssr_html } from 'add-to-calendar-button/ssr';
import { onMount } from 'svelte';
const ssrHtml = atcb_generate_ssr_html({
name: 'Reminder to check the add-to-calendar-button demo',
options: ['Apple', 'Google'],
location: 'World Wide Web',
startDate: '2026-09-18',
endDate: '2026-09-18',
startTime: '10:15',
endTime: '23:30',
timeZone: 'Europe/Berlin',
});
onMount(async () => {
await import('add-to-calendar-button'); // client-side upgrade
});
</script>
{@html ssrHtml}Not your tech stack?
Check out the "Installation" section!
We have strong guides and solutions for all big frontend stacks as well things like WordPress.
Find complete project examples per stack at Stackblitz: Click here .

More functionality (like RSVP) and way less trouble thanks to managed ics file hosting, no-code customization, and more.