Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

lit-modal

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lit-modal

Dialog window based on lit-element

latest
npmnpm
Version
1.2.38
Version published
Weekly downloads
11
-85.33%
Maintainers
1
Weekly downloads
 
Created
Source

LitModal

<lit-modal></lit-modal> element expected to use as once instance per app.

Install

npm i lit-modal

Properties/Attributes

NameProp/AttrTypeDescription
openAttrBooleanOpen/close state
closeBtnTextAttrStringText of default close btn
useStandartCloseBtnAttrBooleanFlag of using default close btn

Styles

NameDefault
--dialog-overlap rgba(0,0,0,0.7)
--dialog-background#fefefe
--dialog-boxshadowrgba(0,0,0,0.7)
--dialog-header-background#111
--dialog-header-color#fefefe
--button-background#222
--button-background-hover#444
--button-bordernone
--button-color#fefefe
--button-padding5px 10px

Demo

HTML

<!DOCTYPE html>
<html>
    <body>
        <div id = 'app'></div>
        <script src = "demo.ts"></script>
    </body>
</html>

JS

import 'lit-modal';
import { html, render } from 'lit-html';

const header = html`Modal header`;
const content = html`Modal content`;
const footer = html`Modal footer`;

const modal = html`
    <lit-modal open 
               .header = "${header}"
               .content = "${content}"
               .footer = "${footer}"
    ></lit-modal>
`;
render(modal, document.getElementById('app'));

Keywords

dialog

FAQs

Package last updated on 24 Oct 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