Experience App SDK
Showpad Apps are built using the Experience App SDK. This is a TypeScript library to help you use ShowpadJS, the JavaScript library injected on the window where your Showpad App is running. It acts as bridge between your app and native Showpad functionalities on our different platforms. The Experience App SDK is a layer on top of this to provide:
- support for local development,
- a modern typed interface,
- and more.
During development of your Showpad App, you'll use the Experience App SDK to communicate with the SDK API.
Platform and Browser Compatibility
The Experience App SDK is exclusively distributed as an ES6 Module (ESM). This modern approach allows you to import the objects as needed and is recommended for compatibility with newer browser versions.
Retrieving the Library
You can install the library with NPM (Node Package Manager) or Yarn. Installation is done during the develoment phase when you scaffold your project.
At the root of your project, issue the following command to perform the installation (note, Node.js must be installed on your system):
- npm
- yarn
npm install @showpad/experience-app-sdk
yarn add @showpad/experience-app-sdk
Then you can import the library:
import { Showpad } from '@showpad/experience-app-sdk';
Special Considerations
Filepaths
Showpad Apps are displayed in Iframes. Absolute paths might resolve incorrectly which can cause issues when importing files or routing in your app. Therefore, we highly recommend using relative paths.