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.
Copy it in
cp dist/nsui.js \
src/FileCabinet/SuiteScripts/acme/lib/├─ sl_approvals.js
└─ lib/nsui.js
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>`;
Ship a real tool
Examples
Built for work queues.
Approvals, order entry and fulfillment, made only from shipped components. Everything below is the real library, live.
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.
Components
Nineteen today.
Each one has a written spec, a design check in CI and a live docs page.
Approve VB-1042 for $4,855.00?
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>