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

aasx-viewer

v0.2.0

Published

Universal, cross-framework visual viewer component for Asset Administration Shell (.aasx) packages and EU Digital Product Passports. 100% compatible with Angular 21/22 and React 19/18.

Readme

aasx-viewer

npm version license bundle size IEC 63278

Universal, cross-framework visual viewer component for Asset Administration Shell (.aasx) packages and EU Digital Product Passports (DPP).
Built as standard Custom Elements (Web Components v1 + Shadow DOM) with dedicated adapters for Angular 21/22, Angular 18-20, React 19, React 18/17, and vanilla HTML/JS. Zero external dependencies.


Features

  • Cross-Framework Native: One single component that runs natively in Angular, React, Vue, Svelte, or plain HTML.
  • Shadow DOM Encapsulation: Zero style bleed; completely immune to host CSS overrides (Tailwind, Bootstrap, Angular Material).
  • Themeable: Dark & Light modes with instant CSS token customization (--aasx-accent, --aasx-bg, --aasx-fg, --aasx-border).
  • Comprehensive IDTA Coverage:
    • 🏷️ Digital Nameplate (IDTA 01001 / IDTA 02006)
    • ⚙️ Technical Data & Physical Units (IDTA 02005)
    • 📄 Handover Documentation (IDTA 02004 / VDI 2770)
    • 🌳 Submodel Hierarchy Tree with accessible keyboard navigation
    • 🌱 EU Digital Product Passport & Carbon Footprint (IDTA 02003)
  • Zero Heavy Runtime: 0 Lit, 0 Stencil, 0 polyfills (< 12 kB unpacked, ~3.5 kB gzipped).

Installation

# npm
npm install aasx-viewer aasx-viewmodel

# yarn
yarn add aasx-viewer aasx-viewmodel

# pnpm
pnpm add aasx-viewer aasx-viewmodel

Usage Guide

1. Angular (Angular 21 & 22, Angular 18–20)

Supports modern Angular standalone components, Angular Signals (input() / output()), and zoneless change detection:

import { Component, signal } from '@angular/core';
import { AasxViewerComponent } from 'aasx-viewer/angular';
import 'aasx-viewer/styles.css';
import type { DigitalTwinViewModel } from 'aasx-viewmodel';

@Component({
  selector: 'app-digital-twin-page',
  standalone: true,
  imports: [AasxViewerComponent],
  template: `
    <div class="twin-container">
      <h2>Asset Digital Twin</h2>
      <aasx-viewer-ng
        [model]="viewModel()"
        theme="dark"
        sections="identification nameplate technical documentation hierarchy passport"
        (nodeSelect)="onPropertySelect($event)">
      </aasx-viewer-ng>
    </div>
  `
})
export class DigitalTwinPageComponent {
  readonly viewModel = signal<DigitalTwinViewModel | null>(null);

  onPropertySelect(event: { id: string }) {
    console.log('Selected property or node:', event.id);
  }
}

Note: You can also use <aasx-viewer> directly in any Angular template by adding schemas: [CUSTOM_ELEMENTS_SCHEMA] to your @Component.


2. React (React 19, 18, 17 & Next.js App Router)

Compatible with React Server Components ('use client' included) and earlier versions:

'use client';
import React, { useState } from 'react';
import { AasxViewer } from 'aasx-viewer/react';
import 'aasx-viewer/styles.css';
import type { DigitalTwinViewModel } from 'aasx-viewmodel';

export function ProductPassportView({ vm }: { vm: DigitalTwinViewModel }) {
  const [selectedId, setSelectedId] = useState<string | null>(null);

  return (
    <div style={{ maxWidth: '960px', margin: '0 auto' }}>
      <AasxViewer
        model={vm}
        theme="dark"
        sections="identification nameplate technical documentation hierarchy passport"
        onNodeSelect={(detail) => setSelectedId(detail.id)}
      />
      {selectedId && <p>Clicked element: {selectedId}</p>}
    </div>
  );
}

3. Plain HTML / Vanilla JS (Zero Build Step)

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aasx-viewer/styles.css">
  <script type="module" src="https://cdn.jsdelivr.net/npm/aasx-viewer/src/index.js"></script>
</head>
<body style="background: #0b1120; padding: 2rem;">

  <!-- Directly via URL -->
  <aasx-viewer src="/api/passports/servo-motor.json" theme="dark"></aasx-viewer>

  <!-- Or bind programmatic ViewModel -->
  <aasx-viewer id="my-viewer" theme="dark"></aasx-viewer>

  <script type="module">
    import { toViewModel } from 'https://cdn.jsdelivr.net/npm/aasx-viewmodel';

    const viewer = document.getElementById('my-viewer');
    viewer.model = myAasViewModel;

    viewer.addEventListener('aasx-select', (e) => {
      console.log('User selected:', e.detail.id);
    });
  </script>
</body>
</html>

Custom Theming

Customize the look and feel using standard CSS Custom Properties:

aasx-viewer {
  --aasx-accent: #0284c7;     /* Primary brand color */
  --aasx-bg: #ffffff;         /* Background color */
  --aasx-fg: #0f172a;         /* Text color */
  --aasx-muted: #64748b;      /* Subtitles & metadata */
  --aasx-border: #e2e8f0;     /* Border lines */
  --aasx-radius: 12px;        /* Corner radius */
}

License

MIT OR Apache-2.0 © 2026 Adarrsh. See THIRD_PARTY_NOTICES.md for attributions.