@saekitominaga/customelements-tooltip-trigger
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.2 • Public • Published

    A custom element that triggers to call the tooltip UI

    npm version

    A custom element that triggers to call the tooltip UI.

    * The tooltip representation uses @saekitominaga/customelements-tooltip.

    Demo

    Examples

    <a is="x-tooltip-trigger"
      href="#annotation-1"
      data-tooltip-element="x-tooltip"
      data-tooltip-close-text="Close"
      data-tooltip-close-src="/assets/tooltip-close.svg"
    >[1]</a>
    <ul class="annotation">
    <li id="fn-1">The text written in this part is displayed as a tooltip. It also recognizes markup such as <a href="#">anchor links</a>.</li>
    </ul>
    
    <!-- ↓ The following element are automatically inserted from JavaScript just before </body> -->
    <x-tooltip></x-tooltip>

    Attributes

    href [required]
    URL hash value of the element that contains the content to be displayed in the tooltip. (e.g. "#annotation-1" )
    data-tooltip-element [optional]
    The text of the close button in the tooltip (Image alternative text).
    data-tooltip-close-text [optional]
    The text of the close button in the tooltip (Image alternative text).
    data-tooltip-close-src [optional]
    The address of the image resource for the close button in the tooltip.

    Install

    npm i @saekitominaga/customelements-tooltip-trigger

    DownloadsWeekly Downloads

    1

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    46.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • saekitominaga