Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 928 Bytes

README.md

File metadata and controls

67 lines (42 loc) · 928 Bytes

vanilla-popover

Small vanilla module for popovers.

See live demo

Installation

npm install polvo-labs/vanilla-popover --save

Make sure to include css too.

Usage

<div data-popover="Place your content here..."></div>
var popover = new VanillaPopover('[data-popover]', {})

API

customClass

  • Type: String
  • Default: vanilla-popover

content

  • Type: String
  • Default: null

template

  • Type: String
  • Default: <div class="{customClass}">{content}</div>

effect

  • Type: String
  • Default: show
  • Options:
    • show: it will only show
    • fade: it will fade

triangle

  • Type: Boolean
  • Default: false

triangleSize

  • Type: Number
  • Default: 10

triangleOffset

  • Type: Number
  • Default: 0

triangleColor

  • Type: String
  • Default: #696969
    • RGB are preferred