Velo Packages are code libraries written using Velo code. Once installed, you can import and call APIs from Velo packages in your code. Although Velo packages are written using Velo APIs, you can use them alongside the Wix JavaScript SDK.
Once you install a package, read the package's README. It explains setup prerequisites, which APIs are exported for use, and how to use the package.
To use a package's APIs, import them in your code.
Use @velo in import paths for Velo packages. Import paths differ depending on whether the API is exported from backend or public files.
To import backend APIs, use this syntax:
For example, assuming you installed the twitter-integration package, you can call its tweet() API as follows:
Notes:
.js file in page code, wrap the backend API in a web module, then import and call the web module from page code.To import public APIs, use this syntax:
For example, assuming you installed the wix-data-helpers package, you can call its getRandomItem() API as follows: