Skip to Content
NSUI

Popover

Floating panel anchored to a trigger.

Use a popover to show short content next to a button: a status filter, column choices or a help note. It uses the native Popover API, so the panel sits in the top layer. NetSuite z-index rules and overflow: hidden containers cannot clip it.

Status filter

Trigger

Set for to the id of the trigger. A click on the trigger opens the panel. A second click closes it. The trigger can be any element. It must be in the same document as the popover, or in the same shadow root.

The popover sets aria-expanded on the trigger.

Closing

  • A click outside the panel closes it.
  • Escape closes it.
  • hide() closes it, and so does removing the open attribute.

A click inside the panel keeps it open.

Placement

placement sets the side and the edge to line up with the trigger.

ValuePanel position
bottom-startBelow the trigger, left edges lined up. The default.
bottom-endBelow the trigger, right edges lined up.
top-startAbove the trigger, left edges lined up.
top-endAbove the trigger, right edges lined up.

When the panel has no room on its side, it flips to the other side. It always stays 8px inside the window. It follows the trigger when the page scrolls or resizes.

HTML
<nsui-popover for="columns" placement="bottom-end">...</nsui-popover>

From code

JavaScript
const popover = document.querySelector('nsui-popover');
popover.show();
popover.hide();
popover.toggle();
popover.addEventListener('popovershow', () => console.log('opened'));
popover.addEventListener('popoverhide', () => console.log('closed'));

popoverhide fires for every close: a trigger click, Escape, an outside click or hide().

Motion

The panel fades in and moves 4px toward its place in 140ms. It closes faster, in 100ms. A panel opened with the keyboard (Enter or Space on the trigger) does not animate. There is no motion when the system asks for reduced motion.

Browser support

The Popover API needs Chrome 114, Firefox 125 or Safari 17.

API

Attributes

Prop

Type

Events

Prop

Type

Slots

Prop

Type

CSS parts

Prop

Type

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

On this page