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

@scania/tegel

v1.48.0

Published

Tegel Design System

Readme

Github release Storybook Status: Beta node-current

@scania/tegel

Official website: https://tegel.scania.com/

Storybook: https://tds-storybook.tegel.scania.com/

The design system supports the design and development of digital solutions at Scania. The purpose is to secure a coherent, premium brand and user experience across all of Scania's digital touchpoints.

Status

This package is currently considered a beta. Version 1.0.0 and later are released, and we see no braking changes coming in near future.

Installation

React

with Typescript

  1. Run npm install @scania/tegel
  2. src folder create a file called register-webcomponents.ts
  3. Paste the following into that file:
import { defineCustomElements, JSX as LocalJSX } from '@scania/tegel/loader';
import { DetailedHTMLProps, HTMLAttributes } from 'react';

type StencilProps<T> = {
  [P in keyof T]?: Omit<T[P], 'ref'> | HTMLAttributes<T>;
};

type ReactProps<T> = {
  [P in keyof T]?: DetailedHTMLProps<HTMLAttributes<T[P]>, T[P]>;
};

type StencilToReact<T = LocalJSX.IntrinsicElements, U = HTMLElementTagNameMap> = StencilProps<T> &
  ReactProps<U>;

declare global {
  export namespace JSX {
    interface IntrinsicElements extends StencilToReact {}
  }
}

defineCustomElements(window);
  1. In your index.tsx import register-webcomponents.ts
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import './register-webcomponents';

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
);

reportWebVitals();
  1. In your global css file (usually App.css) import the tegel stylesheet.
@import url('@scania/tegel/dist/tegel/tegel.css');

with Javascript

  1. Run npm install @scania/tegel
  2. In your index.jsx define the custom components:
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { defineCustomElements } from '@scania/tegel/loader';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
);

reportWebVitals();
defineCustomElements();
  1. In your global css file (usually App.css) import the tegel stylesheet.
@import url('@scania/tegel/dist/tegel/tegel.css');

Angular

  1. Run npm install @scania/tegel
  2. In your main.ts import and call the function defineCustomElements():
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { defineCustomElements } from '@scania/tegel/loader';
import { AppModule } from './app/app.module';

platformBrowserDynamic()
  .bootstrapModule(AppModule)
  .catch((err) => console.error(err));

defineCustomElements(window);
  1. In your app.module.ts import CUSTOM_ELEMENTS_SCHEMA:
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
  1. In your global css file (styles.css) import the tegel stylesheet.
@import url('@scania/tegel/dist/tegel/tegel.css');

HTML

  1. Run npm init to generate a package.json
  2. Run npm install @scania/tegel
  3. Import the package and its style in your <head>:
<script type="module">
  import { defineCustomElements } from './node_modules/@scania/tegel/loader/index.es2017.js';
  defineCustomElements();
</script>
<link rel="stylesheet" href="./node_modules/@scania/tegel/dist/tegel/tegel.css" />

See all available components in the Tegel Design System.

Development notes

When adding or editing Stencil components, do not use DOM property names for instance fields (e.g. private or @State()). Custom elements extend HTMLElement, so names like children, parentElement, scrollWidth, childNodes, firstChild, tagName, shadowRoot are read-only getters on the prototype. Assigning to them (e.g. this.children = ...) throws "Cannot set property X which has only a getter", especially when the component is used from React. Use alternative names (e.g. tabElements instead of children, parentDropdown instead of parentElement, scrollableWidth instead of scrollWidth).

Browser support

See the browser support section on the Tegel website.

Community

Get in touch with the team and the community:

License

All CSS, HTML and JS code are available under the MIT license. The Scania brand identity, logos and photographs found in this repository are copyrighted Scania CV AB and are not available on an open source basis or to be used as examples or in any other way, if not specifically ordered by Scania CV AB.