Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@coffeekraken/dialog-webcomponent
Advanced tools
Readme
Powerful, fully featured and easy to use dialog component
npm install @coffeekraken/dialog-webcomponent --save
First, import the component into your javascript file like so:
import DialogWebcomponent from '@coffeekraken/dialog-webcomponent'
Then simply use it inside your html like so:
<!-- inline content -->
<ck-dialog id="my-cool-dialog">
<template><!-- optional template tag -->
<h1>Hello World</h1>
<p>Phasellus nec dictum arcu, finibus semper tellus. Aliquam mattis dictum.</p>
</template>
</ck-dialog>
<a href="#my-cool-dialog">Click to open the dialog</a>
<!-- automatically opened dialog -->
<ck-dialog opened content="data/my-cool-dialog.html"></ck-dialog>
This webcomponent offers you multiple way to instanciate a dialog. Here's the list:
Open a dialog using a dom component present in the page.
This dom element can be a template
tag too.
<a href="#my-cool-dialog" class="btn btn--primary">Open dialog</a>
<div class="hidden">
<ck-dialog id="my-cool-dialog">
<h1 class="h1 m-b">
My cool dialog
</h1>
<p class="p">
Vivamus vestibulum ultrices eros nec bibendum. In sit amet ultrices mi. Etiam nunc ante, efficitur ac aliquam eget, iaculis quis massa. Duis quis molestie orci. Sed ultricies sem ante, in.
</p>
</ck-dialog>
</div>
Open a content inside an iframe. Usefull to load for example youtube/vimeo/etc... content
<ck-dialog iframe>
<a class="btn btn--primary" href="/data/iframe-demo.html">
Open my content in an iframe dialog
</a>
</ck-dialog>
Open a dialog in modal mode. This mean that the user cannot close the dialog by clicking outside or by the escape key and your in full control of it's state
<a href="#my-cool-dialog" class="btn btn--primary">Open dialog</a>
<div class="hidden">
<ck-dialog id="my-cool-dialog" modal>
<h1 class="h1 m-b">
Hello world
</h1>
<p class="p m-b">
Vivamus vestibulum ultrices eros nec bibendum. In sit amet ultrices mi. Etiam nunc ante, efficitur ac aliquam eget, iaculis quis massa. Duis quis molestie orci. Sed ultricies sem ante, in.
</p>
<a class="btn btn--secondary" ck-dialog-ok>
Close dialog
</a>
</ck-dialog>
</div>
Open a dialog and load his content through an ajax request
<ck-dialog>
<a href="/data/ajax-demo.html" class="btn btn--primary">Open ajax dialog</a>
</ck-dialog>
Open a dialog fully programatically
import strToHtml from '@coffeekraken/sugar/js/string/strToHtml'
import DialogWebcomponent from '@coffeekraken/dialog-webcomponent'
const myDialog = DialogWebcomponent.open(strToHtml('<p>Hello World</p>'), {
modal: true
})
setTimeout(() => {
myDialog.close()
}, 5000)
We are a young collective of front-end creative developers with one goal in mind. Build tools to make every team working day life better. This is our first and only concern. All our tools are build around that purpose. All what we provide are some cool tools that you can use the way you want. These tools features cover a large scope of the front-end workflow (styleguide generation, colors/fonts management, etc...). You can use only the parts that you need and let the rest aside...
FAQs
Powerful, fully featured and easy to use dialog component
The npm package @coffeekraken/dialog-webcomponent receives a total of 0 weekly downloads. As such, @coffeekraken/dialog-webcomponent popularity was classified as not popular.
We found that @coffeekraken/dialog-webcomponent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.