@lvble/core v3.90.0
@lvble/core
@lvble/core is a JavaScript package that provides a set of core functionalities for building interactive web applications with the lvble platform. It includes widgets and modals.
⚡️ Quick start
NPM
You can install @lvble/core using npm (Node Package Manager). Make sure you have Node.js and npm installed on your machine. Open your terminal or command prompt and run the following command:
npm install @lvble/coreIn your index.html:
<html>
<head>
<title>PMS</title>
</head>
<body>
<h1>Welcome to the best PMS ever!</h1>
<table style="width: 50%; margin: 0 auto;">
<tr>
<th>Lvble</th>
</tr>
<tr>
<td><button onclick="openLvbleExperience()">Lvble</button></td>
</tr>
<tr>
<td>Status</td>
</tr>
</table>
<script type="module" src="/main.js"></script>
</body>
</html>And in your main.js file:
import { Lvble } from "@lvble/core";
// Widgets
const l = Lvble({
environment: "sandbox",
onEvent: function (eventType: string, data: any) {
switch (eventType) {
case "EXPERIENCE_OPENED":
...
break;
case "EXPERIENCE_CLOSED":
...
break;
...
default:
break;
}
}
});
const lvbleWidget = l.createWidget({
token: "token"
});
document
.getElementById("lvble-widget")
.appendChild(lvbleWidget);
// Lvble experience
const openLvbleExperience = () =>
l.open({
token: "token"
});<script> tag
Alternatively, you can include @lvble/core directly in your HTML file using a script tag like it's 1997 😎
Add the following line inside the <head> or at the end of the <body> tag:
<script src="https://unpkg.com/@lvble/core"></script>Please refer to the documentation of @lvble/core for a complete list of available functionalities and their usage instructions.
License
11 months ago
12 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
10 months ago
11 months ago
12 months ago
10 months ago
11 months ago
12 months ago
1 year ago
11 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago