New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bopup

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bopup

Component to create a popup

latest
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

bopup

Demo

https://dmitriy-line.github.io/bopup-demo/

Component to create a popup:

♦ suitable for

  • Pop-up forms
  • Privacy Policy
  • pop-up gallerys

Install from NPM.

npm i bopup

Import js

import bopup from "../../node_modules/bopup/dist/js/bopup.js";

Import css

@import '../../node_modules/bopup/dist/css/bopup.css';

Add bopup HTML Layout

<!-- popup container -->
<div class="bopup">
  <!-- close-popup-button -->
  <div class="bopup-close-button"></div>
  <!-- popup wrapper -->
  <div class="bopup-content-wrapper">
    <!--popup content -->
    <!-- any block or content -->
  </div>
</div>

Several popups

To create several popups, just add an extra class to the <div class="bopup">,
for example <div class="bopup bopup_form">

Add any content in to the <div class="bopup-content-wrapper">

create element that will trigger the popup.

Example
<button class="btn">button</button>
<span class="span">span</span>
<div class="div">div</div>

Initialize bopup

Finally, you need to initialize bopup in JS:

bopup(document.querySelector('.btn'), document.querySelector('.bopup'));

css

.bopup-content-wrapper {
  background: #fff;
}

FAQs

Package last updated on 27 Dec 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