@lambahq/nuxt
v1.0.3
Published
Lamba's official Nuxt module
Downloads
21
Maintainers
Readme
Lamba
Integrate the Lamba client library in your nuxt project to start using low code capabilities in your web apps.
Previews
Features
- ⛰ Embed low code capabilities
- 🚠 Same configuration & doc as the CDN version
- 🌲 Enjoy light and dark theme
- 👩🎨 Responsive & mobile friendly UI
Quick Setup
- Add
@lambahq/nuxt
dependency to your project
# Using pnpm
pnpm add @lambahq/nuxt
# Using yarn
yarn add @lambahq/nuxt
# Using npm
npm install @lambahq/nuxt
- Add
@lambahq/nuxt
to themodules
section ofnuxt.config.ts
and setup the runtimeConfig as shown below:
export default defineNuxtConfig({
ssr: true, // "true" or "false". Works eitherway regardless. i.e Lamba is SSR friendly!
modules: [
'@lambahq/nuxt'
]
})
Usage
import { useNuxtApp } from '#app';
const nuxtApp = useNuxtApp();
const openLamba = ()=>{
const config = {
title: "Lamba",
theme: "light",
appId: "65aabeba6182d6903a2ea355",
customerId: "cus_x1847",
};
const lamba = nuxtApp.$lamba(config);
// listening for events
lamba.on("name_of_the_event",(data)=>{
console.log(data);
})
}
Using Up To Date Versions
To always use the updated versions of the library, set the alwaysUseUpToDateVersions
property to true
in the nuxt.config.js
file of your project like so:
export default defineNuxtConfig({
runtimeConfig: {
public: {
lamba: {
alwaysUseUpToDateVersions: true
}
}
}
})
That's it! You can now use Lamba in your Nuxt app ✨