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

@glimmerx/storybook

v0.6.8

Published

storybook for glimmerjs

Readme

Storybook for GlimmerJs


Storybook for GlimmerJs is a UI development environment for your GlimmerJS App. With it, you can visualize different states of your UI components and develop them interactively.

Storybook Screenshot

Storybook runs outside of your app. So you can develop UI components in isolation without worrying about app specific dependencies and requirements.

Getting Started

Automatic setup (tbd)

Manual setup

If you want to set up Storybook manually for your Glimmerjs project, this is the guide for you.

Step 1: Add dependencies

Add @glimmerx/storybook

Add glimmerx/storybook to your project. To do that, run:

yarn add @glimmerx/storybook --save-dev
Add peer dependencies

If these are not already present in the host glimmer app include @glimmerx/core, @glimmerx/component packages in your dependencies as well.

yarn add @glimmerx/core @glimmerx/component

Step 2: Add an npm script

Then add the following NPM scripts to your package.json in order to start or build the storybook app.

{
    "scripts": {
        "storybook": "start-storybook",
        "build-storybook": "build-storybook"
    }
}

Step 3: Create the config file

For a basic Storybook configuration, the only thing you need to do is tell Storybook where to find stories.

To do that, create a file at .storybook/main.js with the following content:

module.exports = {
  stories: ['../src/**/*.stories.@(js|ts)']
}

That will load all the stories underneath your ../src directory that match the pattern *.stories.js. We recommend co-locating your stories with your source files, but you can place them wherever you choose.

Step 4: Write your stories

Now create a ../stories/index.js file, and write your first story like this:

import OtherComponent from './OtherComponent';
import { hbs } from '@glimmerx/component';

// default export determines how stories show up
export default {
  title: ' Example OtherComponent stories using CSF',
  component: OtherComponent,
  argTypes: {
    bgcolor: { control: 'color' },
    count: { control: 'number' },
  },
};

// Story template that can be reused for creating and exporting stories
const Template = (args: Record<string, number | string>) => {
  return {
    componentClass: OtherComponent,
    renderOptions: {
      args: {
        ...args,
      },
    },
  };
};

// Creating and exporing basic story
export const Basic = Template.bind({});
Basic.args = {
  count: 100,
};

// Export an inline story in CSF format
export const inLineBasic = (args) => hbs`<OtherComponent @count={{args.count}} @bgcolor={{args.bgcolor}} }}/>`;
inLineBasic.args = {
  ...Basic.args,
  bgcolor: 'lightblue',
};

Each story is a single state of your component. In the above case, there is a story using the SampleComponent.

Finally: Run your Storybook

Now everything is ready. Run your storybook with:

yarn storybook

Storybook should start, on a random open port in dev-mode.

Now you can develop your components and write stories and see the changes in Storybook immediately since it uses Webpack’s hot module reloading.

For more information visit: storybook.js.org


Storybook also comes with a lot of addons and a great API to customize as you wish. You can also build a static version of your storybook and deploy it anywhere you want.