Giter Site home page Giter Site logo

hhy5277 / ng-modal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mazdik/ng-modal

0.0 1.0 0.0 114 KB

Angular resizable and draggable modal component

Home Page: https://mazdik.github.io/ng-modal/

TypeScript 74.30% JavaScript 6.90% CSS 12.96% HTML 5.85%

ng-modal's Introduction

Angular resizable and draggable modal

Simple resizable and draggable modal component. (Demo)

version in vanilla js

npm i ng-modal-lib --save

Sample

import { ModalModule } from 'ng-modal-lib';

@NgModule({
  imports: [
    ModalModule
  ]
})
<button type="button" class="button" (click)="modalRoot.show()">Open modal</button>
<app-modal #modalRoot class="modal-demo">
  <ng-container class="app-modal-header">Demo modal</ng-container>
  <ng-container class="app-modal-body">
    <h3>MODAL DIALOG</h3>
    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.
      Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s.</p>
  </ng-container>
  <ng-container class="app-modal-footer">
    <button type="button" class="button button3" (click)="modalRoot.hide()">Delete</button>
    <button type="button" class="button button1" (click)="modalRoot.hide()">Save</button>
    <button type="button" class="button button2" style="float: right;" (click)="modalRoot.hide()">Close
    </button>
  </ng-container>
</app-modal>
.modal-demo .ui-modal {
  width: 37.5rem;
  /* for resize limits use min-width, min-height, max-width, max-height in css */
}
.modal-demo .ui-modal-overlay, .modal-demo .ui-modal {
  z-index: 10;
}
/* colors */
:root {
  --dt-color-primary: #5b9bd5;
}
/* for IE */
.ui-modal-header {
  background-color: #5b9bd5;
}

Properties

Attribute Type Default Description
scrollTopEnable boolean true
maximizable boolean false
backdrop boolean true
inViewport boolean false

ng-modal's People

Contributors

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