Skip to Content
NSUI

Select

Dropdown with label, placeholder and validation.

Use a select to pick one value from a list. The list opens in a popover with NSUI's own styling, not the browser's menu.

Options as data

Set the options property to an array, or pass JSON in the options attribute. When options is set, the select ignores <option> children.

Disabled options

A disabled option shows in the muted tone. Keys, type-ahead and clicks skip it.

Inside a grid or a clipped box

The list opens in the top layer. It is not cut off by a container with overflow: hidden, such as the data grid toolbar or a NetSuite subtab, and it sits above NetSuite's own layers. Near the bottom of the window it opens above the field.

Without required, the placeholder is the first entry in the list. Pick it to clear the value.

Keyboard

The select follows the WAI-ARIA select-only combobox pattern. Focus stays on the field.

KeyList closedList open
Down arrow, Up arrow, Enter, SpaceOpens the list at the selected optionArrows move the highlight. Enter and Space select and close.
Home, EndOpens the list at the first or last optionMoves to the first or last option
LettersOpens the list at the first matchMoves to the match. Type several letters quickly to match more. Press one letter again to cycle.
EscapeCloses with no change
TabMoves focusSelects the highlighted option and moves focus

A list opened with the keyboard does not animate. A list opened with the pointer fades in, like a popover.

Required and error

With required, the placeholder option cannot be selected and an empty value is invalid. error shows a message and marks the field invalid.

In NetSuite

Set field to bind the select to a native body field.

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

The label, mandatory and disabled state and the options come from the record. Each change writes back with setValue. For large popup fields that do not expose their options, the select shows the current value only. Attributes you set yourself, such as label or options, win.

Events

change fires when the user picks a different option. event.detail is { value, label, name }. Setting value from code does not fire it.

JavaScript
document.querySelector('nsui-select').addEventListener('change', (e) => {
  console.log(e.detail.value, e.detail.label);
});

React 19

React 19 sets options as a property, so pass an array: <nsui-select options={[{ value: '1', label: 'East' }]} />. Write other attributes in kebab-case, as in HTML. Listen with onchange (lowercase), which React 19 passes to the element as an event listener.

Styling

Parts: root, label, control, select (the field you click), listbox, option, hint, error. The select part used to be the native <select>. It is now the trigger, so ::part(select) rules still apply.

Browser support

The list uses the Popover API: Chrome 114, Firefox 125 or Safari 17.

API

Attributes

Prop

Type

Properties

Prop

Type

Events

Prop

Type

Slots

Prop

Type

CSS parts

Prop

Type

CSS custom properties

Prop

Type

NSUI is a community project. It is not an official Oracle NetSuite product. NetSuite is a trademark of Oracle.

On this page