atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
11.78k stars 517 forks source link

Arrow not works and docs to be improved #1128

Open salicius opened 1 year ago

salicius commented 1 year ago

I'm starting with TippyJS and I noticed a very poor documentation about the project. I'm trying to get a different arrow shape and from the official docs there are no examples and sample code to take an example from. Like in this section https://atomiks.github.io/tippyjs/#arrows there isn't one single example about it, there is no list of complete props the devs can use.

I googled and I find out this way to get in in my html file round arrow:

...
<head>
    <link rel="stylesheet"
      href="https://unpkg.com/tippy.js@6/animations/scale.css"
    />
    <link rel="stylesheet"
      href="https://unpkg.com/tippy.js@6/dist/svg-arrow.css"
    />
</head>
<body>
    <button type="button" class="btn btn-info" id="myTooltip"> Order </button>
...
    <script src="https://unpkg.com/@popperjs/core@2"></script>
    <script src="https://unpkg.com/tippy.js@6"></script>

    <script>
      tippy("#myTooltip", {
        content: "I'm a Tippy content!",
        placement: "top",
        animation: "scale",
        arrow: tippy.roundArrow,
      });
    </script>

and it seems work but if i tried to get narrow arrow in this way tippy.narrowArrow or tippy.largeArrow or some other arrow it doesn't work.