New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

toolpop

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toolpop

💬 **Toolpop** is a lightweight Vue 3 `v-pop` directive for reactive tooltips and simple HTML/image popovers.

latest
Source
npmnpm
Version
0.4.9
Version published
Maintainers
1
Created
Source

💬 Toolpop

💬 Toolpop is a lightweight Vue 3 v-pop directive for reactive tooltips and simple HTML/image popovers.

DEMO | Live Demo on StackBlitz

🔥 Quick Usage

Drop it into your Vue template easily:


<p v-pop="'Simple tooltip'">Hover me</p>


<button v-pop="`Count: ${count}`" @click="count++">Click me</button>


<button v-pop.click.html="'<strong>Bold</strong> text'">Click me</button>


<button v-pop:bottom-start="'Aligned to start'">Bottom Start</button>

screenshot

✨🎨 Fully customizable tooltip appearance with extensive styling options!

  • 🎁 tiny - only 1 dependency: @floating-ui/dom (web)
  • ✨ Auto-flipping + positioning with top, bottom-start, right-end, etc.
  • ⚡ Supports reactive values, ref, computed, functions
    • 🚀 Zero-lag HTML Popovers: .html tooltips are pre-rendered and kept in the DOM, making images and complex content appear instantly without network or render lag.
  • 🧩 Optional HTML/image mode via .html

🚀 Installation & Setup

with pnpm:

pnpm add toolpop

with npm:

npm install toolpop

🧩 Use as Plugin

// main.ts
import Toolpop from 'toolpop'

// Registers v-pop globally with default options
app.use(Toolpop)

// Or register with custom options
// (See the "Options" section below for the full list of available properties):
app.use(Toolpop, { 
  color: 'red', 
  fontSize: 16 
})

✒️ Use as Directive

// main.ts
import { createPop } from 'toolpop'

// Registers v-pop globally
app.directive('pop', createPop()) // name "pop" whatever you want

⚙️ Props & Modifiers

Placements (Props)

You can control the placement using directive arguments (e.g., v-pop:right):

PlacementDescriptionExample
:topAbove the element (Default)v-pop="'Text'"
:bottom, :left, :rightCentered on the specified sidev-pop:bottom="'Text'"
-start suffixAligns tooltip to the start of the elementv-pop:top-start="'Text'"
-end suffixAligns tooltip to the end of the elementv-pop:right-end="'Text'"

Behavior Modifiers

  • .html – interpret value as raw HTML (e.g., images or rich markup). Performance Note: To guarantee instant responsiveness, .html popovers are pre-rendered upon component mount and persistently kept in the DOM (hidden via CSS). This eliminates layout shifts and prevents network lag when hovering over elements with images.
  • .click – shows the tooltip on click instead of hover
  • .leave – hides the tooltip on mouseleave (only useful with .click)

✏️ Options

interface PopOptions {
  fontSize: number
  paddingX: number
  paddingY: number
  duration: number
  fontFamily: string
  color: string
  backgroundColor: string
  borderColor: string
  borderRadius: number
  scaleStart: number
  blur: number
}

For typed custom options when registering the directive manually:

import { createPop, type PopOptions } from 'toolpop'

const options: Partial<PopOptions> = {
  fontSize: 28,
  paddingX: 15,
  paddingY: 4,
  blur: 0,
  backgroundColor: 'rgba(0, 0, 0, 0.1)',
}

app.directive('pop', createPop(options))

📁 Local use (optional)

Copy src/pop.ts into your project and register locally:

import { createPop } from '@/directives/pop' // path where you put it ...
app.directive('pop', createPop())

🌍 Live Projects

🪪 License

MIT © 2026 JsonKody

Keywords

vue

FAQs

Package last updated on 09 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts