
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
compose-dialog
Advanced tools
A nice dialog component.
npm install compose-dialog
There are a few ways to instantiate a dialog.
Using the data-dialog-title="Some title"
attribute on anything will trigger showing a Dialog with the provided options (as data-dialog
attributes.)
<button class="btn"
data-dialog-title="Leaving Already?"
data-dialog-description="But we were having so much fun…"
data-dialog-continue="Peace out"
data-dialog-close="Stick around"
data-dialog-follow="/session/destroy/"
>Open a dialog</button>
<button
data-dialog-confirm="true"
data-dialog-title="Delete this user?"
data-dialog-description="Deleting a user is a permanent action. Are you sure?"
>Delete User</button>
NOTE: You do have to require('compose-dialog')
at some point though.
var Dialog = require('compose-dialog')
Dialog.show({ /* options */})
This will handle all there is to handle for showing a Dialog.
dialog-if
Using data-dialog-if="[selector]"
you can only trigger a dialog if the selector is found. So for example if you
only want to show a dialog if a checkbox is checked.
data-dialog-title="Are you sure?" data-dialog-if="#form_id .dangerous-checkbox:checked"
Now when the element is clicked, the event will be stopped and the dialog will be shown only if the checkbox is checked.
FAQs
A nice dialog component.
The npm package compose-dialog receives a total of 20 weekly downloads. As such, compose-dialog popularity was classified as not popular.
We found that compose-dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.