Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-tooltip

Easy tooltips with Vue 2.x

  • 2.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
133K
decreased by-5.11%
Maintainers
1
Weekly downloads
 
Created

What is v-tooltip?

v-tooltip is a Vue.js directive for creating tooltips. It allows developers to easily add tooltips to their Vue components with customizable options for appearance, behavior, and positioning.

What are v-tooltip's main functionalities?

Basic Tooltip

This feature allows you to add a basic tooltip to any element. In this example, a tooltip with the text 'This is a tooltip' is added to a button.

<template>
  <button v-tooltip="'This is a tooltip'">Hover me</button>
</template>

<script>
import { VTooltip } from 'v-tooltip';

export default {
  directives: {
    tooltip: VTooltip
  }
};
</script>

Custom Tooltip Content

This feature allows you to customize the content and appearance of the tooltip. In this example, the tooltip has custom content and a custom CSS class for styling.

<template>
  <button v-tooltip="{ content: 'Custom content', classes: 'custom-class' }">Hover me</button>
</template>

<script>
import { VTooltip } from 'v-tooltip';

export default {
  directives: {
    tooltip: VTooltip
  }
};
</script>

<style>
.custom-class {
  background-color: #333;
  color: #fff;
}
</style>

Tooltip with HTML Content

This feature allows you to include HTML content within the tooltip. In this example, the tooltip contains bold and italic text using HTML tags.

<template>
  <button v-tooltip="{ content: '<strong>Bold text</strong> and <em>italic text</em>', html: true }">Hover me</button>
</template>

<script>
import { VTooltip } from 'v-tooltip';

export default {
  directives: {
    tooltip: VTooltip
  }
};
</script>

Tooltip with Delay

This feature allows you to set a delay for showing and hiding the tooltip. In this example, the tooltip appears after a 500ms delay and hides after a 100ms delay.

<template>
  <button v-tooltip="{ content: 'This tooltip has a delay', delay: { show: 500, hide: 100 } }">Hover me</button>
</template>

<script>
import { VTooltip } from 'v-tooltip';

export default {
  directives: {
    tooltip: VTooltip
  }
};
</script>

Other packages similar to v-tooltip

Keywords

FAQs

Package last updated on 19 Mar 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc