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

floating-vue

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

floating-vue

Easy Vue tooltips, dropdowns, menus & popovers using floating-ui

  • 5.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
263K
decreased by-6.73%
Maintainers
2
Weekly downloads
 
Created

What is floating-vue?

floating-vue is a Vue.js library that provides a set of components and utilities for creating floating elements such as tooltips, popovers, dropdowns, and more. It is designed to be highly customizable and easy to use, making it a popular choice for adding floating UI elements to Vue applications.

What are floating-vue's main functionalities?

Tooltip

This feature allows you to add tooltips to any element. The code sample demonstrates how to use the v-tooltip directive to add a tooltip to a button.

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

<script>
import { VTooltip } from 'floating-vue';
import 'floating-vue/dist/style.css';

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

Popover

This feature allows you to create popovers that can be attached to any element. The code sample shows how to use the v-popover directive to attach a popover to a button.

<template>
  <div>
    <button v-popover:myPopover>Click me</button>
    <popover id="myPopover">
      <p>This is a popover content</p>
    </popover>
  </div>
</template>

<script>
import { VPopover } from 'floating-vue';
import 'floating-vue/dist/style.css';

export default {
  directives: {
    popover: VPopover
  }
};
</script>

Dropdown

This feature allows you to create dropdown menus. The code sample demonstrates how to use the v-dropdown directive to create a dropdown menu attached to a button.

<template>
  <div>
    <button v-dropdown:myDropdown>Open Dropdown</button>
    <dropdown id="myDropdown">
      <ul>
        <li>Option 1</li>
        <li>Option 2</li>
        <li>Option 3</li>
      </ul>
    </dropdown>
  </div>
</template>

<script>
import { VDropdown } from 'floating-vue';
import 'floating-vue/dist/style.css';

export default {
  directives: {
    dropdown: VDropdown
  }
};
</script>

Other packages similar to floating-vue

Keywords

FAQs

Package last updated on 08 Jan 2024

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