Embedding Basics

Once you’ve created a NExS app, you can embed it on any web page. NExS provides several embedding options depending on your needs and what your hosting platform supports.

Embedding Options

When you publish an app, NExS generates multiple embed codes in your app management console:

Use this code if your site allows script embedding. It supports dynamic resizing for the best user experience and is required when using the NExS APIs:

<script class="nexs"
  src="https://static.nexs.com/js/nexs_embed.js"
  data-nexs-app-url="https://platform.nexs.com/app/YOUR-APP-ID">
</script>

Benefits:

  • Automatic height adjustment as content changes
  • Required for JavaScript API and Declarative API features
  • Best user experience

Iframe Embed (Alternate)

Use this embed code if your site doesn’t allow embedded scripts:

<div style="padding-top:75.5%;position:relative;width:100%">
  <iframe
    src="https://platform.nexs.com/app/YOUR-APP-ID"
    style="position:absolute;left:0;top:0;width:100%;height:100%;border:0">
  </iframe>
</div>

This uses a responsive container that maintains aspect ratio. Adjust the padding-top percentage to change the aspect ratio:

  • 75.5% = roughly 4:3 aspect ratio
  • 56.25% = 16:9 aspect ratio
  • 100% = square

Note: The Declarative API and JavaScript API require the script embed method.

WordPress Shortcode

If you’re using WordPress with the NExS WordPress Plugin:

[nexs_app id="YOUR-APP-ID"]

See the WordPress Integration guide for installation and options.

Progressive Web App (PWA)

BETA: NExS apps can be installed as standalone apps on iOS, Android, Windows, and Mac devices.

Direct users to your app’s PWA URL:

https://platform.nexs.com/pwa/YOUR-APP-ID/app

On supported browsers (like Chrome), users will see an “Install…” button to add your app to their device. The installation method varies by browser and platform—consult your browser’s documentation for specific instructions.

Extending Your Embedded App

When using the script embed method, you can extend your app’s capabilities:

  • Declarative API — Connect HTML elements to cells without writing code. Create custom-styled inputs, display calculated values anywhere on your page, and build fully custom interfaces while NExS handles calculations.

  • JavaScript API — Programmatic control for developers. Set and get cell values, respond to events, and integrate NExS with your application logic.

Next Steps