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

el-message-in-popover

v1.1.2

Published

Show ElMessage in the popover to elevate its display hierarchy, preventing it from being overlapped by dialogs

Readme

ElMessage In Popover

English | 中文


English

Solve Element Plus ElMessage Display Issues in HTML5 Dialog

A lightweight solution that enables Element Plus ElMessage to work properly within HTML5 <dialog> elements using the Popover API.

Problem

Element Plus's ElMessage component cannot display when used inside HTML5 <dialog> elements because:

  • Dialog elements create a new top-layer stacking context
  • ElMessage's z-index cannot break out of the dialog's context
  • Messages appear behind the dialog or are completely invisible

Solution

This package uses the modern Popover API to create a message container that can break out of the dialog's stacking context, ensuring messages are always visible on top.

Features

  • 🎯 Seamless API - Same API as original ElMessage
  • 🚀 Zero Configuration - Works out of the box
  • 📦 Lightweight - Only 2KB gzipped
  • 🔒 Type Safe - Full TypeScript support
  • 🎨 Auto Fallback - Falls back to original ElMessage if Popover not supported

Installation

npm i el-message-in-popover

Usage

import { ElPopMessage } from 'el-message-in-popover'
// or this:
//import { ElPopMessage as ElMessage } from 'el-message-in-popover'

// Use exactly like ElMessage
ElPopMessage.success('Operation successful!')
ElPopMessage.error('Something went wrong!')

// In HTML5 dialog - this will work!
dialogElement.showModal()
ElPopMessage.warning('This message will be visible!')

API

Same as Element Plus ElMessage:

ElPopMessage(options)
ElPopMessage.success(message)
ElPopMessage.error(message) 
ElPopMessage.warning(message)
ElPopMessage.info(message)
ElPopMessage.primary(message)
ElPopMessage.closeAll()

Browser Support

  • ✅ Chrome/Edge 114+
  • ✅ Safari 17+
  • ✅ Firefox (behind flag)
  • ⚠️ Falls back to original ElMessage in unsupported browsers

License

Unlicense


中文

解决 Element Plus ElMessage 在 HTML5 Dialog 中的显示问题

一个轻量级解决方案,使用 Popover API 让 Element Plus 的 ElMessage 在 HTML5 <dialog> 元素中正常显示。

问题描述

Element Plus 的 ElMessage 组件在 HTML5 <dialog> 元素内无法正常显示,因为:

  • Dialog 元素创建了新的顶层堆叠上下文
  • ElMessage 的 z-index 无法突破 dialog 的上下文
  • 消息会显示在 dialog 后面或完全不可见

解决方案

本包使用现代的 Popover API 创建消息容器,可以突破 dialog 的堆叠上下文,确保消息始终显示在最顶层。

特性

  • 🎯 无缝 API - 与原始 ElMessage 相同的 API
  • 🚀 零配置 - 开箱即用
  • 📦 轻量级 - 仅 2KB gzipped
  • 🔒 类型安全 - 完整的 TypeScript 支持
  • 🎨 自动降级 - 浏览器不支持 Popover 时自动回退到原始 ElMessage

安装

npm install el-message-in-popover

使用方法

import { ElPopMessage } from 'el-message-in-popover'
// 或者: 
//import { ElPopMessage as ElMessage } from 'el-message-in-popover'

// 用法与 ElMessage 完全相同
ElPopMessage.success('操作成功!')
ElPopMessage.error('出错了!')

// 在 HTML5 dialog 中 - 这会正常工作!
dialogElement.showModal()
ElPopMessage.warning('这条消息将会可见!')

API

与 Element Plus ElMessage 完全相同:

ElPopMessage(options)
ElPopMessage.success(message)
ElPopMessage.error(message)
ElPopMessage.warning(message) 
ElPopMessage.info(message)
ElPopMessage.primary(message)
ElPopMessage.closeAll()

浏览器支持

  • ✅ Chrome/Edge 114+
  • ✅ Safari 17+
  • ✅ Firefox (需开启标志)
  • ⚠️ 不支持的浏览器会自动回退到原始 ElMessage

许可证

Unlicense