
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@windui/snackbar
Advanced tools
npm i @windui/snackbar --save
yarn add @windui/snackbar
new Snackbar({
title: "Hello components!",
message: "Confirm or cancel.",
options: {
type: "success",
components: {
// default: Confirm
confirmText: "Approuver",
// default: Cancel
cancelText: "Annuler",
confirmEvent: ({ $, event }) => {
alert(`Clicked to ${$.snackbar.title}`);
$.hide();
// also you can use $.show() again
},
cancelEvent: ({ $, event }) => {
alert(`Cancelled!`);
$.hide();
}
}
}
})
<script src="https://cdn.jsdelivr.net/npm/@windui/snackbar@x.x.x/windui.snackbar.min.js"></script>
<script>
new WuiSnackbar({
// ...props
}).show();
</script>
import Snackbar from "@windui/snackbar";
export default function Index() {
const trigger = () => {
const hello = new Snackbar({
options: {
duration: 3000,
speed: 500, // animation speed
type: "info", // snackbar types: info, success, error, warning
align: "right", // right or left
position: "bottom" // top or bottom
},
title: "Hello World!",
message: "No post on Sundays!"
});
// show snackbar
hello.show();
// hide before timeout
// hello.hide();
};
return (
<button onClick={trigger}>
Show Snackbar!
</button>
);
};
FAQs
WindUI | Snackbar Package | by Swôth
The npm package @windui/snackbar receives a total of 45 weekly downloads. As such, @windui/snackbar popularity was classified as not popular.
We found that @windui/snackbar 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.