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';To make Angular work properly with the Web Component, you need to import the CUSTOM_ELEMENTS_SCHEMA and update the @NgModule/@Component block respectively.
// app.component.ts
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@Component({
//(...),
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppComponent {}// app.module.ts
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
//(...)
@NgModule({
//(...),
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
//(...)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-10-03"
end-date="2026-10-03"
start-time="10:15"
end-time="23:30"
time-zone="EST"
></add-to-calendar-button>To bind data to a specific attribute, you need to use the syntax [attr.PARAMETER]="your data".
Based on your setup, the data flow might happen after the first rendering of the button. This is no problem, but you might see errors in the console when in debug mode, claiming there is data missing. Mind that due to this reason, binding the "identifier" option would not work.
<add-to-calendar-button
[attr.name]="titleVar"
options="'apple','google'"
[attr.start-date]="dateVar"
></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.
When you load the browser script directly, every other style and language loads automatically on demand (a few KB each). Bundled integrations should register the required modules explicitly as shown below.
When you bundle the script, import the style and language modules you need before the main module. This registers them fetch-free before the custom element upgrades, including during SSR hydration:
import 'add-to-calendar-button/styles/3d'; // any style besides "default"
import 'add-to-calendar-button/i18n/de'; // any language besides English
import 'add-to-calendar-button'; // load the component lastTo load all styles or all languages in one statement, use the aggregate modules: import 'add-to-calendar-button/styles/all' and import 'add-to-calendar-button/i18n/all'.
See the "button-style" and "language" options at the Configuration page for the full picture.
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.