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

slidev-addon-interactive-table

v1.1.0

Published

A Slidev addon for interactive tables with row/column highlighting and persistent cell selection

Readme

Slidev Addon: Interactive Table

一个为 Slidev 设计的交互式表格组件,支持多种高亮模式,让你的演示更加生动有趣。

✨ 功能特性

  • 🖱️ 鼠标悬停行高亮: 鼠标悬停时高亮整行
  • ⌨️ Shift + 悬停列高亮: 按住 Shift 键悬停时高亮整列
  • 📌 持续单元格高亮: Cmd/Ctrl + 点击切换单元格持续高亮
  • 🎨 响应式设计: 自适应不同屏幕尺寸
  • 🌙 深色主题支持: 自动适配深色模式
  • 🔧 高度可定制: 支持自定义样式和主题

📦 安装

npm install slidev-addon-interactive-table

🚀 使用方法

基本用法

在你的 Slidev 演示文稿中使用 InteractiveTable 组件:

<InteractiveTable sep='|'>

```md
Name|Age|City|Occupation
Alice|25|New York|Designer
Bob|30|London|Developer
Charlie|35|Tokyo|Manager

使用逗号分隔符

<InteractiveTable sep=','>

```md
产品,价格,库存,状态
iPhone 15,999,50,有货
MacBook Pro,1999,25,有货
iPad Air,599,100,有货

🎮 交互操作

| 操作 | 效果 | |------|------| | 鼠标悬停单元格 | 高亮整行 | | Shift + 鼠标悬停 | 高亮整列 | | Cmd/Ctrl + 点击单元格 | 切换单元格持续高亮 |

⚙️ 配置选项

Props

| 属性 | 类型 | 默认值 | 描述 | |------|------|--------|------| | sep | String | ',' | 数据分隔符 | | theme | String | 'interactive-table' | CSS 类名主题 |

示例

<InteractiveTable 
  sep='|' 
  theme='my-custom-table'
  class='w-full mt-4'
>
  <!-- 表格数据 -->
</InteractiveTable>

🎨 自定义样式

你可以通过 CSS 自定义表格的外观:

/* 自定义高亮颜色 */
.interactive-table .highlight-row {
  background-color: #your-row-color !important;
}

.interactive-table .highlight-column {
  background-color: #your-column-color !important;
}

.interactive-table .highlight-persistent {
  background-color: #your-persistent-color !important;
  border-color: #your-border-color !important;
}

/* 自定义表格样式 */
.interactive-table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

🌙 深色主题

组件自动支持深色主题,会根据用户的系统偏好自动切换样式。

📝 数据格式

表格数据应该以 Markdown 代码块的形式提供,第一行作为表头,后续行作为数据行:

Header1|Header2|Header3
Data1|Data2|Data3
Data4|Data5|Data6

🔧 开发

本地开发

# 克隆项目
git clone <repository-url>
cd slidev-addon-interactive-table

# 安装依赖
npm install

# 运行示例
npm run dev

构建

npm run build

📄 许可证

MIT License

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📞 支持

如果你在使用过程中遇到问题,请:

  1. 查看 示例文档
  2. 提交 Issue
  3. 参考 Slidev 官方文档

享受你的交互式演示体验! 🎉