Guides
How to install the Add to Calendar Button with Vue
Step 1: npm installation
Install the package from the npm registry.
npm install add-to-calendar-buttonStep 2: Import it
Import the module into the component, where you want to use the button.
import 'add-to-calendar-button';Step 3: Optimize the Vue config
Theoretically, this was already it.
Vue works extremely well with Web Components.
However, you might notice a warning in the browser console.
To get rid of this, you need to provide a little bit more information to the compiler options.
This can go into your vite.config.js or other places depending on your setup. Check the official Vue documentation for more details: click here .
// vite.config.js or vite.config.ts
compilerOptions: { isCustomElement: (tag) => tag.includes('-')}In case the Add to Calendar Button is the only Web Component in your project, you could also be a little bit more explicit here.
In this case, our recommendation is to define tags, which start with "add-" as "custom elements".
// vite.config.js or vite.config.ts
compilerOptions: { isCustomElement: (tag) => tag.startsWith('add-')}Step 4: Use it
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-30" end-date="2026-10-30" start-time="10:15" end-time="23:30" time-zone="EST"></add-to-calendar-button>Styles & languages
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.
Bundling via npm (recommended for frameworks)
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 Englishimport '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.