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

@itkdm/open-lab-components

v0.1.1

Published

Zero-dependency, host-agnostic HTML fragment component library for STEM education — 210+ interactive physics, chemistry, biology, math and science components.

Readme

Open Lab Components

210+ 零依赖、即插即用的 STEM 教育交互组件库,覆盖物理、化学、生物、数学、科学五大学科。

npm license

English | 中文

Open Lab Components 首页

✨ 特性

  • 🎯 纯 HTML Fragment — 不依赖任何框架,复制即用
  • 🎨 CSS 变量驱动 — 所有参数通过 CSS 变量配置
  • 🔒 样式隔离 — 不污染宿主环境
  • 🛠️ TypeScript 支持 — 完整类型定义
  • 无障碍 — 内置 ARIA 标签

📦 组件概览

210 个组件44 个分类

| 学科 | 分类 | 示例 | |------|------|------| | 物理 | 电路、力学、光学、热学、波动、电磁、流体 | 抛体运动、透镜成像、示波器、卡诺循环 | | 化学 | 器皿、反应、气体、溶液、分子模型 | 酸碱中和、理想气体定律、元素周期表 | | 生物 | 细胞、器官、遗传、生态 | 有丝分裂、DNA 结构、循环系统 | | 数学 | 几何、函数、微积分、统计、向量 | 函数图像、单位圆、算盘、分数圆 | | 科学 | 地球科学、生命科学、科学工具 | 太阳系、水循环、显微镜 |

在线展示站 — 浏览全部组件、实时调参、复制代码

🚀 快速开始

npm 安装

npm install @itkdm/open-lab-components
const lab = require('@itkdm/open-lab-components');

const all = lab.list();                                    // 全部 210 个组件
const physics = lab.list({ category: 'physics/mechanics' }); // 按分类筛选
const html = lab.readSync('phy.mechanics.projectile.interactive'); // 读取 HTML

直接使用 HTML

components/ 目录复制组件文件,粘贴到你的页面中,通过 CSS 变量配置参数:

<div class="cmp" data-cmp-id="phy.resistor.axial.basic"
     style="--cmp-size: 80px; --cmp-body: #caa070;">
    <!-- 组件内容 -->
</div>

本地开发

git clone https://github.com/itkdm/open-lab-components.git
cd open-lab-components && npm install
npm run dev:site      # 启动开发服务器
npm run validate      # 验证组件规范
npm run build         # 构建全部

🤝 参与贡献

欢迎提交 PR!流程:Fork → 创建分支 → 提交 → PR

详见 贡献指南 · 组件规范 · 分类规则 · 事件协议

📄 许可证

MIT

☕ 赞助 & 联系

这个项目由一名大三学生独立开发维护。如果对你有帮助,欢迎请我喝杯咖啡 :)

微信:17884902310(备注 OLC) · GitHub:@itkdm

🙏 致谢


Made by 布吉岛 · ⭐ 觉得有用就给个 Star