Skip to content

Label Info

Label plus inline info trigger that toggles an explanatory popover.

Live Preview
import '@bnotk/dsx/components/label-info.js';
<dsx-label-info text="VAT number" placement="right">
Enter the tax ID exactly as it appears on the official document.
</dsx-label-info>

Shows optional label text, an inline info-icon trigger, and slotted popover content.

PropertyTypeDefaultDescription
textstringOptional bold label text shown before the trigger.
placement’top’ | ‘bottom’ | ‘left’ | ‘right''right’Controls which side the popover appears on.

None.

None.

SlotDescription
defaultPopover body content.

This element does not expose shadow parts.

  • Clicking the trigger toggles the popover open state.
  • When opened, the component registers a document click handler that closes the popover if the event target is outside the host.
  • The trigger uses role="button" and updates aria-expanded.
  • The popover element is toggled with display: none/block rather than opacity transitions.
  • The trigger is a compact inline info icon that matches the field-label helper affordance used elsewhere in the system.
  • Popover surface uses white background, grey border, 4px radius, and --ds2-shadow-md.