Giter VIP home page Giter VIP logo

popupkit's Introduction

PopupKit 1.3.5

PopupKit is an NPM package that you can call from one line of JavaScript code to display a nice-looking popup modal.

What's new in 1.3.5?

  • Fixed CSS import error

Install

NPM

npm i popupkit

Yarn

yarn add popupkit

After installation, paste this into your html file's <head> tag:

<script src="./node_modules/popupkit/index.min.js"></script>

or

CDN

Or if you'd rather use a CDN, paste this inside the <head> tag instead:

<script src='https://unpkg.com/[email protected]/index.min.js'></script>

Usage

All you need is one line of JavaScript code. Yep! You heard me right. One line is all you need.

popupkit.simpleLight("This is the title", "This is the message.", () => {
    console.log("Popup is closed")
});
  1. Call the popupkit object
  2. Call in the theme function
  3. Type title in the first parameter
  4. Type title in the second parameter
  5. (OPTIONAL) Write a callback function for when he user closes the popup

Themes

Theme function Description
simpleLight() A simple light-themed popup
simpleDark() A simple dark-themed popup
blackAndWhite() A black and white popup
blueAndWhite() A blue and white popup
redAndWhite() A red and white popup
yellowAndWhite() A yellow and white popup
greenAndWhite() A green and white popup

More to come! ๐Ÿ˜‰

License

This project is licensed under the MIT License - see the MIT License file for details.

popupkit's People

Contributors

braydentw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.