Git Product home page Git Product logo

isabella232 / bootstrap-popup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdbootstrap/bootstrap-popup

0.0 0.0 0.0 963 KB

Responsive Popup built with Bootstrap 5. Examples include modal popup, popup box, notification message popup, alert popup, lightbox popup & popup form.

Home Page: https://mdbootstrap.com/docs/standard/extended/popup/

License: MIT License

JavaScript 42.41% HTML 0.21% SCSS 57.38%

bootstrap-popup's Introduction

Responsive Popup built with Bootstrap 5. Examples include modal popup, popup box, notification message popup, alert popup, lightbox popup & popup form.

Check out Bootstrap Popup Documentation for detailed instructions & even more examples.

Modal popups

Click the button to launch the popup. If you are looking for more popups like this check out our main Modal docs as well as our Modal generator.

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-mdb-toggle="modal" data-mdb-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">...</div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-mdb-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

Alert popups

Click the buttons to launch the alert popups. If you are looking for more popups like these check out our main Alerts docs as well as our Modal generator.

<!-- Trigger buttons -->
<button type="button" id="primary" class="btn btn-primary m-1">Primary</button>
<button type="button" id="secondary" class="btn btn-secondary m-1">Secondary</button>
<button type="button" id="success" class="btn btn-success m-1">Success</button>
<button type="button" id="danger" class="btn btn-danger m-1">Danger</button>
<button type="button" id="warning" class="btn btn-warning m-1">Warning</button>
<button type="button" id="info" class="btn btn-info m-1">Info</button>
<button type="button" id="light" class="btn btn-light m-1">Light</button>
<button type="button" id="dark" class="btn btn-dark m-1">Dark</button>

<!-- Alerts -->
<div
  class="alert fade"
  id="alert-primary"
  role="alert"
  data-mdb-color="primary"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple primary alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-secondary"
  role="alert"
  data-mdb-color="secondary"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple secondary alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-success"
  role="alert"
  data-mdb-color="success"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple success alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-danger"
  role="alert"
  data-mdb-color="danger"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple danger alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-warning"
  role="alert"
  data-mdb-color="warning"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple warning alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-info"
  role="alert"
  data-mdb-color="info"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple info alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-light"
  role="alert"
  data-mdb-color="light"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple light alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div
  class="alert fade"
  id="alert-dark"
  role="alert"
  data-mdb-color="dark"
  data-mdb-position="top-right"
  data-mdb-stacking="true"
  data-mdb-width="535px"
  data-mdb-width="535px"
  data-mdb-append-to-body="true"
  data-mdb-hidden="true"
  data-mdb-autohide="true"
  data-mdb-delay="2000"
>
  A simple dark alert with
  <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
const triggers = [
  'primary',
  'secondary',
  'success',
  'danger',
  'warning',
  'info',
  'light',
  'dark',
];
const basicInstances = [
  'alert-primary',
  'alert-secondary',
  'alert-success',
  'alert-danger',
  'alert-warning',
  'alert-info',
  'alert-light',
  'alert-dark',
];

triggers.forEach((trigger, index) => {
  let basicInstance = mdb.Alert.getInstance(document.getElementById(basicInstances[index]));
  document.getElementById(trigger).addEventListener('click', () => {
    basicInstance.show();
  });
});

How to use?

  1. Download MDB 5 - free UI KIT

  2. Choose your favourite customized component and click on the image

  3. Copy & paste the code into your MDB project

▶️ Subscribe to YouTube channel for web development tutorials & resources


More extended Bootstrap documentation

bootstrap-popup's People

Contributors

bwsky-a 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.