npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amplydevteam/tooltip

v0.0.2

Published

A zero-config, attribute-based tooltip library for Webflow

Readme

Amply Tooltip

A zero-config, attribute-based tooltip library for Webflow.

Installation

CDN (Webflow)

Add to your project's custom code:

<!-- In <head> -->
<link
  rel="stylesheet"
  href="https://unpkg.com/@amplydevteam/tooltip/dist/tooltip.css"
/>

<!-- Before </body> -->
<script
  type="module"
  src="https://unpkg.com/@amplydevteam/tooltip/dist/tooltip.js"
></script>

NPM

npm install @amplydevteam/tooltip
import "@amplydevteam/tooltip";

Usage

Just add attributes to any element. Tooltips auto-initialize on page load.

<button amply-tooltip amply-tooltip-text="Hello!">
  Hover me
</button>

Attributes

Core

| Attribute | Description | Example | | -------------------- | ------------------------------- | -------------------------------------------- | | amply-tooltip | Marks element as tooltip target | amply-tooltip | | amply-tooltip-text | Plain text content | amply-tooltip-text="Hello" | | amply-tooltip-html | HTML content (entities decoded) | amply-tooltip-html="<strong>Bold</strong>" |

Note: HTML entities in amply-tooltip-html are automatically decoded for safety. Use &quot; for quotes, &lt; for <, &gt; for >.

<!-- Safe way to include quotes -->
<button amply-tooltip-html='Say "Hello"'>Hover</button>

Position

| Attribute | Values | Default | | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | amply-tooltip-placement | top, top-start, top-end, bottom, bottom-start, bottom-end, left, left-start, left-end, right, right-start, right-end | top | | amply-tooltip-offset | 0 - 100 (pixels) | 10 |

Appearance

| Attribute | Values | Default | | ------------------------- | ---------------------- | ------- | | amply-tooltip-theme | dark, light | dark | | amply-tooltip-arrow | true, false | true | | amply-tooltip-max-width | 50 - 1000 (pixels) | 350 |

Animation

| Attribute | Values | Default | | ------------------------- | --------------------------------------------- | ------- | | amply-tooltip-animation | fade, scale, shift-away, shift-toward | fade | | amply-tooltip-duration | 0 - 2000 (ms) | 200 | | amply-tooltip-delay | 0 - 5000 (ms) | 0 |

Behavior

| Attribute | Values | Default | | ----------------------------- | ----------------------------------- | ------- | | amply-tooltip-trigger | hover, click, focus, manual | hover | | amply-tooltip-interactive | true, false | false | | amply-tooltip-hide-on-click | true, false | true |

Examples

Basic

<button amply-tooltip amply-tooltip-text="Simple tooltip">
  Hover me
</button>

Positioned

<button
  amply-tooltip
  amply-tooltip-text="I'm on the bottom!"
  amply-tooltip-placement="bottom"
>
  Bottom tooltip
</button>

Styled

<button
  amply-tooltip
  amply-tooltip-text="Light theme tooltip"
  amply-tooltip-theme="light"
  amply-tooltip-animation="scale"
>
  Light & animated
</button>

Click trigger

<button
  amply-tooltip
  amply-tooltip-text="Click to toggle!"
  amply-tooltip-trigger="click"
>
  Click me
</button>

Interactive with HTML

<span
  amply-tooltip
  amply-tooltip-html="<strong>Rich</strong> content with <em>HTML</em>"
  amply-tooltip-interactive="true"
  amply-tooltip-max-width="200"
>
  Hover for details
</span>

Custom timing

<button
  amply-tooltip
  amply-tooltip-text="Delayed and slow"
  amply-tooltip-delay="500"
  amply-tooltip-duration="400"
>
  Slow reveal
</button>

JavaScript API

For advanced use cases, you can control tooltips programmatically:

import tooltip, {
  initTooltip,
  destroyTooltip,
  refreshTooltip,
  decodeHtmlEntities,
} from "@amplydevteam/tooltip";

// Re-initialize all tooltips (e.g., after dynamic content load)
tooltip.init();

// Initialize a specific element
initTooltip(document.querySelector("#my-button"));

// Destroy tooltip on element
destroyTooltip(document.querySelector("#my-button"));

// Refresh tooltip (re-read attributes)
refreshTooltip(document.querySelector("#my-button"));

// Destroy all tooltips
tooltip.destroyAllTooltips();

// Decode HTML entities (utility)
decodeHtmlEntities("&lt;b&gt;Bold&lt;/b&gt;"); // → "<b>Bold</b>"

Validation

Options are validated with Zod. Invalid values are logged to console with helpful error messages.

import {
  validateOptions,
  schemas,
} from "@amplydevteam/tooltip";

// Validate options programmatically
const result = validateOptions({
  text: "Hello",
  placement: "top",
  duration: 200,
});

if (result.success) {
  console.log(result.data);
} else {
  console.error(result.error);
}

// Access schemas for custom validation
const { PlacementSchema, AnimationSchema } = schemas;

Development

# Install dependencies
pnpm install

# Start dev server
pnpm dev

# Build for production
pnpm build

Release

# Create release (version bump + changelog + git tag)
pnpm run release

# Push with tags
git push --follow-tags origin main

# Publish to npm
pnpm publish

License

MIT