Embed Apps in NEXT.JS
Last updated
Was this helpful?
Last updated
Was this helpful?
First, install the Lowcoder SDK. Lowcoder publishes with every Version Release, a new version of Lowcoder SDK too.
yarn:
npm:
Publish your app/module in Lowcoder.
Set the app/module's access privilege as public.
Add code in your existing app as below.
Create Wrapper Component to Embed Lowcoder Apps
Dynamically import the LowcoderAppWrapper component in the file where you want to embed the Lowcoder app
Now, we can embed our Lowcoder app by just passing the appId to the imported LowcoderAppWrapper component.
Create Wrapper Component to Embed Lowcoder Modules
Dynamically import the LowcoderModuleWrapper component in the file where you want to embed the Lowcoder Module
Now, we can embed our Lowcoder module by just passing the appId to the imported LowcoderModuleWrapper component.
The result of the above code in NEXT.JS App is shown below in the Demo. The List component with Yellow background is the Lowcoder App and the Table component is the Lowcoder Module :
appId
string
The app's id is required!
--
baseUrl
string
The api base url of the Lowcoder Instance.
https://api-service.lowcoder.cloud
onModuleEventTriggered
(eventName: string) => void
(Only for Modules) Triggered when module's custom event is triggered. Works only when the app is a module.
--
onModuleOutputChange
(output: any) => void
(Only for Modules) Triggered when module's outputs change. Works only when the app is a module.
--