npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mizuka/messagejs

v0.1.0

Published

A simple message toast without any dependencies

Downloads

3

Readme

alt text

🔗 Table of Contents


📍 Overview

If you don't want to introduce the entire component library, but still need a simple page message prompt


👾 Features

  • Zero Dependencies
  • Pure Javascript
  • Lightweight
  • Easy to use

📁 Project Structure

└── messagejs/
    ├── LICENSE
    ├── demo.ts
    ├── doc
    │   └── vitepress.config.js
    ├── index.html
    ├── package.json
    ├── pnpm-lock.yaml
    ├── public
    │   └── vite.svg
    ├── src
    │   ├── const.ts
    │   ├── index.ts
    │   ├── style.ts
    │   ├── typescript.svg
    │   └── vite-env.d.ts
    ├── tsconfig.json
    └── vite.config.js

🚀 Getting Started

⚙️ Installation

Install messagejs using one of the following methods:

Using npm  

npm install @mizuka/messagejs --save

-Usage

Run messagejs using the following command: Using npm  

import { Message } from "@mizuka/messagejs";

function showMessage(
  type: "success" | "error" | "info" | "warning" | "loading"
): Message {
  const result = Message[type](getMessage(), {
    showClose: isShowClose(),
  });
  return result;
}

OPTIONS

| Property Name | Type | Description | | --- | --- | --- | | message | string | (() => string) | The message text to be displayed. It can be a string or a function that returns a string. | | type | MessageType | The type of the message. It can be one of the following: "success", "error", "info", "warning", "loading". The default value is "info". | | icon | string | The SVG icon to be displayed. It should be a string representing the SVG code. | | dangerouslyUseHTMLString | boolean | A boolean value indicating whether the message property should be treated as HTML. The default value is false. | | customClass | string | A string representing the custom class name to be added to the message container. | | duration | number | The duration for which the message should be displayed in milliseconds. If set to 0, the message will not auto-close. The default value is 3000. | | showClose | boolean | A boolean value indicating whether the close button should be displayed. The default value is false. | | center | boolean | A boolean value indicating whether the message text should be centered. The default value is false. | | onClose | (instance: Message) => void | A callback function that is called when the message is closed. It takes the Message instance as a parameter. | | offset | number | The offset from the top of the page where the message should be displayed. The default value is 40. | | appendTo | HTMLElement | The HTML element where the message should be appended. The default value is document.body. |


Other Example

if you want change the max size display of the message sametime, you can use the following code:

import { Message } from "@mizuka/messagejs";

Message.manager.max = 10; // default 3

if you want change the margin between messages , you can use the following code:

import { Message } from "@mizuka/messagejs";

Message.manager.margin = 8; // default 16

📌 Project Roadmap

  • [X] Task 1: basic implement

🔰 Contributing


🎗 License

This project is protected under the MIT License. For more details, refer to the LICENSE file.