You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

lowcoder-sdk

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lowcoder-sdk

## Usage

2.6.6
npm
Version published
Weekly downloads
37
-76.13%
Maintainers
1
Weekly downloads
 
Created
Source

lowcoder-sdk

Usage

yarn:

yarn add lowcoder-sdk

npm:

npm install lowcoder-sdk

Integrate Lowcoder's app/module into existing app page

  • Publish your app/module in Lowcoder.
  • Set the app/module's access privilege as public.
  • Add code in your existing app as below.

Import style

import "lowcoder-sdk/dist/style.css";

For react app:

import { LowcoderAppView } from "lowcoder-sdk";

<LowcoderAppView appId="{YOUR_APPLICATION_ID}" />;

LowcoderViewProps

NameTypeDescriptionDefault value
appIdstringThe app's id in Lowcoder. Required!--
baseUrlstringLowcoder's api base url--
onModuleEventTriggered(eventName: string) => voidTriggered when module's custom event is triggered. Works only when the app is a module.--
onModuleOutputChange(output: any) => voidTriggered when module's outputs change. Works only when the app is a module.--

Invoke module methods

import { useRef } from "ref";
import { LowcoderAppView } from "lowcoder-sdk";

function MyExistingAppPage() {
  const appRef = useRef();
  return (
    <div>
      <LowcoderAppView appId={YOUR_APPLICATION_ID} ref={appRef} />;
      <button onClick={() => appRef.current?.invokeMethod("some-method-name")}>
        Invoke method
      </button>
    </div>
  );
}

For vanilla js:

import { bootstrapAppAt } from "lowcoder-sdk";

const node = document.querySelector("#my-app");

async function bootstrap() {
  const instance = await bootstrapAppAt(YOUR_APPLICATION_ID, node);

  // set module inputs
  instance.setModuleInputs({ input1: "xxx", input2: "xxx" });

  // invoke module methods
  instance.setModuleInputs({ input1: "xxx", input2: "xxx" });

  // listen module event trigger
  instance.on("moduleEventTriggered", (eventName) => {
    console.info("event triggered:", eventName);
  });

  // listen module output change
  instance.on("moduleOutputChange", (data) => {
    console.info("output data:", data);
  });
}

Keywords

lowcoder

FAQs

Package last updated on 22 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts