Skip to Content
NSUI

Tip

Info button that explains a value in a short text card.

Use a tip to explain a figure where it stands, for example how "Credit used" is made up. The card holds short text only. For links, buttons or fields, use a popover.

Credit used: 132%Balance $41,280.50 plus unbilled orders $38,201.15, against a credit limit of $60,000.00.

How it opens

  • Pointer: the card opens after the pointer rests on the button for 150ms. It stays open while the pointer is on the button or on the card, and closes 100ms after the pointer leaves both.
  • Keyboard: the card opens at once when the button gets focus, and closes when focus leaves.
  • Click or tap: the card opens and stays open until a second click, Escape or a click outside.
  • Escape closes the card from any state. Focus stays on the button.

Opening a tip never closes another open panel, such as a select list or a grid filter.

Accessibility

  • Set label to name the button, for example "Credit used details". The default is "More information".
  • Screen readers read the card text as the button's description. The tip keeps a hidden copy of the text inside its shadow root, because ARIA id references cannot cross into it.
  • Keep the card to plain text. Nothing inside it can take focus.

Load on demand

The tiptoggle event fires with detail.open each time the card opens or closes. Fill the card when it first opens:

JavaScript
const tip = document.querySelector('nsui-tip');
tip.addEventListener('tiptoggle', async (e) => {
  if (e.detail.open && !tip.textContent.trim()) tip.textContent = await loadCreditBreakdown();
});

Methods: show(), hide(), toggle(). Set placement to bottom-start (default), bottom-end, top-start or top-end; the card flips when there is no room.

Motion

The card fades in and moves 4px toward its place in 140ms, and fades out in 100ms. A card opened by keyboard focus does not animate. There is no motion when the system asks for reduced motion.

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