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

@felleslosninger/minid-elements

v0.1.5

Published

MinID Web Components

Readme

@felleslosninger/minid-elements

This repository contains a collection of web components built with Lit. The web components are published at https://www.npmjs.com/package/@felleslosninger/minid-elements

Installation

Install the package:

npm install @felleslosninger/minid-elements

or

yarn add @felleslosninger/minid-elements

CSS Setup

minid-elements uses Tailwind CSS v4 and CSS cascade layers internally. To prevent style conflicts, you must declare the layer order before importing Tailwind in your global stylesheet:

/* Establish layer order before @import 'tailwindcss', so ds.* layers sit
   between base and utilities rather than after utilities. */
@layer theme, base, ds.theme, ds.base, ds.components, components, utilities;
@import 'tailwindcss';
@import '@felleslosninger/minid-elements/styles';
@source '../../node_modules/@felleslosninger/minid-elements/dist';

The stylesheet link in your HTML must have the data-mid-tailwind attribute so the components can resolve scoped styles correctly:

<link rel="stylesheet" href="./styles/tailwind.css" data-mid-tailwind />

CSS entrypoints

| Import path | File | Description | |---|---|---| | @felleslosninger/minid-elements/styles | dist/styles.css | Component styles | | @felleslosninger/minid-elements/theme | dist/theme.css | Design tokens / theme | | @felleslosninger/minid-elements/globals | dist/index.css | Global base styles |

Usage

Import the desired components into your project:

import '@felleslosninger/minid-elements/button';
<mid-button variant="primary">Click me</mid-button>

Translations

Built-in UI labels (e.g. "Clear", "Show password", "Open country selector") are available in Norwegian Bokmål, Nynorsk, Northern Sami, and English. Components pick up the page language automatically via the lang attribute.

To override or add translations for a language:

import { registerTranslations } from '@felleslosninger/minid-elements';

registerTranslations('en', {
  clear: 'Remove',
  showPassword: 'Reveal password',
  hidePassword: 'Conceal password',
  openCountrySelector: 'Choose country',
});

CDN Usage

Alternatively, you can use MinId Elements directly from our CDN. Here's an example of how to include the components in your HTML file:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>MinID CDN Example</title>
    <link
      rel="stylesheet"
      href="https://cdn.minid.no/minid-elements/latest/index.css"
      data-mid-tailwind
      crossorigin="anonymous"
    />
    <script
      type="module"
      src="https://cdn.minid.no/minid-elements/latest/index.js"
    ></script>
  </head>
  <body>
    <mid-button>Click me</mid-button>
  </body>
</html>

This example demonstrates how to include the mid-button component. You can replace this with any other component from the MinId Elements library.

Documentation

View the complete component documentation and examples in our Storybook:

https://elements.minid.no/

Development

If you're contributing to this project, follow these steps:

  1. Clone the repository.
  2. Install dependencies: pnpm install.
  3. Build the project: pnpm run build.
  4. Run the development server: pnpm run storybook:dev.

Publishing

This project uses changesets for versioning and publishing.

Adding a changeset

When you make a change that should be released, add a changeset:

pnpm changeset

Follow the prompts to select the bump type (patch, minor, or major) and describe the change. This creates a markdown file in the .changeset/ directory that should be committed with your PR.

Releasing

When PRs with changesets are merged to main, the changesets action will automatically create a "Version Packages" PR that bumps versions and updates the changelog. Merging that PR triggers the actual publish to npm and deploys the new version to the CDN.

Contributing

We welcome contributions! Please feel free to open issues and pull requests.

License

MIT License - See LICENSE for more information.