- React / Next.js with Hooks
- React / Next.js
- HTML
- Angular
- Vue.js
Install React package
npm:yarn:
Copy
Ask AI
npm install @veltdev/react
Copy
Ask AI
$ yarn add @veltdev/react
Install types (optional)
If you’re using TypeScript, you can install the types package.
Copy
Ask AI
npm install --save-dev @veltdev/types
Grab your Velt API Key
Go to console.velt.dev and grab your Velt API Key

Safelist your domain
In the Velt console, add the URL where your app is deployed to the list of Managed Domains.

Add the VeltProvider
Add the VeltProvider component to the root of your app.Add your Velt API key.
Copy
Ask AI
import { VeltProvider } from '@veltdev/react';
Copy
Ask AI
<VeltProvider apiKey="YOUR_API_KEY">
<YourRootComponent/>
</VeltProvider>
We recommend following the setup guide that uses
React / Next.js with Hooks for a cleaner experience.Install React package
npm:yarn:
Copy
Ask AI
npm install @veltdev/react
Copy
Ask AI
$ yarn add @veltdev/react
Install types (optional)
If you’re using TypeScript, you can install the types package.
Copy
Ask AI
npm install --save-dev @veltdev/types
Grab your Velt API Key
Go to console.velt.dev and grab your Velt API Key

Safelist your domain
In the Velt console, add the URL where your app is deployed to the list of Managed Domains.

Add the VeltProvider
Add the VeltProvider component to the root of your app.Add your Velt API key.
Copy
Ask AI
import { VeltProvider } from '@veltdev/react';
Copy
Ask AI
<VeltProvider apiKey="YOUR_API_KEY">
<YourRootComponent/>
</VeltProvider>
Grab your Velt API Key
Go to console.velt.dev and grab your Velt API Key

Safelist your domain
In the Velt console, add the URL where your app is deployed to the list of Managed Domains.

Import the Velt Script tag
Copy
Ask AI
<script type="module" src="https://cdn.velt.dev/lib/sdk@latest/velt.js" onload="loadVelt()"></script>
Install types library (optional)
If you are using Typescript, install the types library:
Copy
Ask AI
npm i @veltdev/types --save-dev
Grab your Velt API Key
Go to console.velt.dev and grab your Velt API Key

Safelist your domain
In the Velt console, add the URL where your app is deployed to the list of Managed Domains.

Add Custom Elements Schema in App Module
Add
schemas: [CUSTOM_ELEMENTS_SCHEMA] to your App Module:Copy
Ask AI
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA], // Add this line
})
export class AppModule { }
Install types library (optional)
If you are using Typescript, install the types library:
Copy
Ask AI
npm i @veltdev/types --save-dev
Grab your Velt API Key
Go to console.velt.dev and grab your Velt API Key

Safelist your domain
In the Velt console, add the URL where your app is deployed to the list of Managed Domains.

Allow Velt Elements in Main.js
In main.js, add the following code to allow Velt elements in your Vue app:
Copy
Ask AI
Vue.config.ignoredElements = [
/velt-*/
]
Copy
Ask AI
'use client' // Add this line for Next.js only
import { VeltProvider } from '@veltdev/react';
export default function App() {
return (
<VeltProvider apiKey="YOUR_API_KEY">
<YourRootComponent/>
</VeltProvider>
);
}

