Neu Modal Component
neu-modal-component is a simple lightweight and a cross framework library for managing modals inside any type of project. It was built for modern browsers using Stencil JS, TypeScript, HTML5 and SCSS.
Modals are used to display content in a layer above the app. This paradigm is used in cases such as the creation or editing of a record, as well as various types of messaging and wizards.
Getting Started
To use neu-modal-component in your project install it via npm:
npm i neu-modal-component
Tag
<neu-modal-bundle
title="Modal Title.."
content="Add Your Modal content..."
size="md">
</neu-modal-bundle>
Attributes
title: To add the title to your modal box
content: To add the content to your modal box
size: To define the size of your modal ( sm, md, lg )
Method
openModal()
How to Trigger Modal in Native JavaScript
function openModalHandiler() {
var neuModalBundle = document.body.querySelector('neu-modal-bundle');
neuModalBundle.openModal();
}
Your done!