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

vue3-popper

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-popper

A Vue 3 popper component. Uses PopperJS v2.

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51K
increased by21.21%
Maintainers
1
Weekly downloads
 
Created
Source

vue3-popper

A popover component for Vue 3

Documentation

Check out the documentation

Install

NPM

npm install vue3-popper

Yarn

yarn add vue3-popper

Usage

Vue environment

<template>
  <Popper>
    <button>Trigger element</button>
    <template #content>
      <div>This is the Popper content</div>
    </template>
  </Popper>
</template>

<script>
  import { defineComponent } from "vue";
  import Popper from "vue3-popper";

  export default defineComponent({
    components: {
      Popper,
    },
  });
</script>

Props

NameDefaultDescription
placementbottomPreferred placement of the popover
disableClickAwayfalseDisables automatically closing the popover when the user clicks away from it
offsetX0Distance in pixels along the trigger element
offsetY12Distance in pixels away from the trigger element
hoverfalseTrigger the popover on hover
arrowfalseDisplay an arrow on the popover
arrowPadding0Stop arrow from reaching the edge of the Popper (in pixels)

Events

NameDescription
open:popperWhen the popover is open
close:popperWhen the popover is hidden

Slots

NameDescription
contentFor the popover content

Slot props

The content slot gives you access to useful variables and functions.

NameTypeDescription
closefunctionA function to close the Popper

CSS variables

Popper only comes with some barebones styling by default, but it also uses a list of predefined CSS variables. You can overwrite these variables to suit your needs.

CSS variableExample value
--popper-theme-background-color#ffffff
--popper-theme-background-color-hover#ffffff
--popper-theme-text-colorinherit
--popper-theme-border-width1px
--popper-theme-border-stylesolid
--popper-theme-border-color#eeeeee
--popper-theme-border-radius6px
--popper-theme-padding16px
--popper-theme-box-shadow0 6px 30px -6px rgba(0, 0, 0, 0.25)

Keywords

FAQs

Package last updated on 01 Jul 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