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

@elementa/core

v0.0.1-alpha.3

Published

Elementa is a Vue.js component style guide, built with Vue for Vue projects

Readme

Elementa Style Guide

Elementa is a Vue.js component style guide, built with Vue for Vue projects.

Warning: this project is in a very early phase. You should not use it except to experiment with it, or if you want to contribute.

Quick start

npm install --save-dev @elementa/core

Live reloading does not work when adding new Element files, restart Elementa after adding a new Element.

Configuration

If you want to change the default configuration, you can create an elementa.config.js file in the root directory of your project.

// elementa.config.js
module.exports = {
  // Add custom webpack configuration.
  // See: https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
  configureWebpack: {},
  elementSuffix: 'elm',
  // Define your navigation schema.
  navigationSchema: {
    components: {
      title: 'Components',
      children: {
        // If you want to add an element as child of `App`
        // you must define its parent as `components.app`.
        app: {
          title: 'App',
        },
      },
    },
  },
  paths: {
    root: process.cwd(),
    // The `<rootDir>` placeholder is automatically
    // replaced by the path you've specified above.
    src: '<rootDir>/src',
  },
};

Elements

Elements are the pages of your style guide. Every Element describes one, or a group of similar components.

src
├── App.vue
└── components
    ├── AppButton.elm.vue
    └── AppButton.vue

Every file inside your src directory which ends with .elm.vue (this can be changed in the configuration) is automatically detected as an Element and added to the style guide.

<template>
  <elementa-element>
    <template slot="title">Button</template>

    <p>Bootstrap includes several predefined button styles, each serving its
    own semantic purpose, with a few extras thrown in for more control.</p>

    <elementa-demo :controls="controls">
      <app-button
        :size="controls.size.value"
        :type="controls.type.value"
      >
        {{ controls.text.value }}
      </app-button>
    </elementa-demo>
  </elementa-element>
</template>

<script>
/* elementa-metadata
parent: components
slug: button
title: Button
*/

import AppButton from './AppButton.vue';

import ElementaDemo from '@elementa/core/src/components/ElementaDemo.vue';
import ElementaElement from '@elementa/core/src/components/ElementaElement.vue';

export default {
  name: 'Button',
  components: {
    AppButton,
    ElementaDemo,
    ElementaElement,
  },
  data() {
    return {
      // Controls make it possible to manipulate the data
      // of your component directly in the style guide.
      controls: {
        text: {
          label: 'Text',
          type: 'text',
          value: 'Button',
        },
        size: {
          label: 'Size',
          type: 'select',
          value: 'm',
          options: ['m', 'l', 'xl'],
        },
        type: {
          label: 'Type',
          type: 'select',
          value: 'primary',
          options: ['primary', 'success', 'danger'],
        },
      },
    };
  },
};
</script>

Metadata

Use a metadata block at the beginning of the <script> section of your component, to define to which parent the Element belongs, which slug to use for the URL and which title to use in the navigation. You must provide all three properties.

// Default
/* elementa-metadata
parent: components
slug: button
title: Button
*/

// Nested parent
/* elementa-metadata
parent: components.app
slug: button
title: Button
*/

Do not forget to add the new parent item to your navigationSchema property in the configuration when defining a new nested parent in a metadata block.

You have to restart Elementa after modifying the metadata of an Element for the changes to take effect.

Demo

Elementa Element with Controls

Controls

Currently only Controls of type text and select are supported, more to come.

Theming

Elementa themes are basically regular Vue components which contain all the CSS styles of the style guide app. If you want to change the layout or the style of your style guide, you can create your own Elementa theme and tell Elementa, in the elementa.config.js configuration file, to use your custom theme instead of the default one.

// elementa.config.js
module.exports = {
  theme: `./src/components/MyElementaTheme.vue`,
};

Theme template

Here you can see a minimal implementation of an Elementa custom theme. If you want to only make minor changes to the default theme, you can also copy the default theme and work your way from there.

<template>
  <div class="MyElementaTheme">
    <div class="MyElementaTheme__sidebar">
      <elementa-nav></elementa-nav>
    </div>
    <main class="MyElementaTheme__main">
      <slot></slot>
    </main>
  </div>
</template>

<script>
import ElementaNav from '@elementa/core/src/components/ElementaNav.vue';

export default {
  name: `MyElementaTheme`,
  components: {
    ElementaNav,
  },
};
</script>

<style>
/* This is the place for your custom styles. */
</style>

About

Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner

License

MIT