Giter VIP home page Giter VIP logo

vue-popper's Introduction

@livelybone/vue-popper

dependency: popper.js gzip: 7.4kb pkg.module arrow control supported ssr supported

pkg.module supported, which means that you can apply tree-shaking in you project

A vue component of popper.js, and the arrow position control is implemented

popper.js see: https://popper.js.org

repository

https://github.com/livelybone/vue-popper.git

Demo

https://livelybone.github.io/vue/vue-popper/

Installation

npm i -S @livelybone/vue-popper

Register

import VuePopper from '@livelybone/vue-popper'

// Global register
Vue.component('popper', VuePopper)

// Local register
new Vue({
  components:{'popper': VuePopper}
})

Props

Name Type DefaultValue Description
arrowPosition String middle Set the position of arrow, options: middle start end
arrowOffsetScaling Number 1 Set the left offset scaling of arrow, usually to be window.devicePixelRatio
referenceElm HTMLElement parentNode Prop reference of popper.js
popperOptions Object Defaults of popper.js Prop options of popper.js

style

For building style, you can use the css or scss file in lib directory.

// scss
import 'node_modules/@livelybone/vue-popper/lib/css/index.scss'

// css
import 'node_modules/@livelybone/vue-popper/lib/css/index.css'

Or

// scss
@import 'node_modules/@livelybone/vue-popper/lib/css/index.scss';

// css
@import 'node_modules/@livelybone/vue-popper/lib/css/index.css';

Or, you can build your custom style by copying and editing index.scss

vue-popper's People

Contributors

livelybone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.