Web Components for NetSuite.For Suitelets, SPAs and record pages.

The controls NetSuite doesn’t ship, as plain HTML tags. Copy nsui.js into your SDF project and deploy it with your scripts. 41.9 KB gzip, Shadow DOM, no framework.

Batchline: a real order editor, built on nsui.js. View source
01

Copy it in

cp dist/nsui.js \
  src/FileCabinet/SuiteScripts/acme/lib/
SuiteScripts/acme/
├─ sl_approvals.js
└─ lib/nsui.js
02

Build the page in a Suitelet

const src = file.load({
  id: '/SuiteScripts/acme/lib/nsui.js',
}).url;
html.defaultValue = `
  <script src="${src}"></script>
  <nsui-select label="Customer"></nsui-select>
  <nsui-data-grid id="lines" totals>
  </nsui-data-grid>`;
03

Ship a real tool

41.9KB
gzip, the whole library
0deps
no framework at runtime
19components
each with a spec and tests
3places
record pages, Suitelets, SPAs

Examples

Built for work queues.

Approvals, order entry and fulfillment, made only from shipped components. Everything below is the real library, live.

DenyApprove selected

Numbers

Money reads first.

ERP screens are numbers. Every amount uses tabular figures, aligns right, and sets the cents and the currency sign in a lighter tone, so the eye reads the whole amount first. Copy and paste still give the plain text.

$64,210.00
Globex Manufacturing$64,210.00
Redline Parts$48,200.00
Harbor Supply Co.$12,480.00
Summit Tools$3,915.50

Components

Nineteen today.

Each one has a written spec, a design check in CI and a live docs page.

Where it runs

Anywhere NetSuite renders HTML.

The same file works on all three. Shadow DOM keeps NetSuite’s global CSS out.

Suitelets

Full custom pages: approval queues, order desks, workbenches. The main use.

html.defaultValue = `
  <script src="${src}"></script>
  <nsui-data-grid>…`;

SPAs

NetSuite single-page apps with JSX, compiled with gulp. Works next to UIF.

import { h } from 'nsui';
return <nsui-card heading="Queue">…

Record pages

Add a panel to a record with a User Event. Controls can bind to native fields.

<nsui-select field="entity"></nsui-select>