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

@vitus-labs/rocketstories

v2.2.0

Published

Rocketstyle is ultra powerful and extensible styling system for building React components blazingly fast, easily and make them easily extensible and reusable.

Downloads

1,760

Readme

@vitus-labs/rocketstories

Auto-generated Storybook stories from rocketstyle components.

npm license

One factory call gives you a complete Storybook setup — default story, dimension showcases, custom renders, and list views. Auto-detects rocketstyle dimensions, generates controls for pseudo-states, and supports configurable layouts. Also works with plain React components.

Features

  • Zero-boilerplate stories.main(), .dimension(), .render(), .list() output methods
  • Auto dimension detection — reads rocketstyle component dimensions and generates showcases
  • Storybook controls — auto-generated arg table with pseudo-state toggles
  • Configurable layout — direction, alignment, gap for story rendering
  • Immutable chaining.attrs(), .controls(), .storyOptions(), .config()
  • Works with any component — rocketstyle components get enhanced features, plain components work too

Installation

npm install @vitus-labs/rocketstories

Quick Start

// Button.stories.tsx
import { init } from '@vitus-labs/rocketstories'
import Button from './Button'

const storyOf = init({ decorators: [ThemeDecorator] })
const stories = storyOf(Button).attrs({ label: 'Click me' })

export default stories.init()

export const Default = stories.main()
export const States = stories.dimension('states')
export const Sizes = stories
  .storyOptions({ direction: 'inline', gap: 24 })
  .dimension('sizes')

API

rocketstories(component, options?)

One-shot factory. Creates a story builder for the given component.

import { rocketstories } from '@vitus-labs/rocketstories'

const stories = rocketstories(Button, {
  storyOptions: { gap: 24, direction: 'rows' },
  decorators: [ThemeDecorator],
})

init(options?)

Curried factory for shared configuration across multiple components.

import { init } from '@vitus-labs/rocketstories'

const storyOf = init({
  storyOptions: { gap: 16, direction: 'rows', alignY: 'top' },
  decorators: [ThemeDecorator],
})

// Reuse for multiple components
const buttonStories = storyOf(Button)
const inputStories = storyOf(Input)

Output Methods

.init()

Returns the Storybook default export (title, component, argTypes).

export default stories.init()

.main()

Renders the component in its default state with Storybook controls.

export const Default = stories.main()

.dimension(name, options?)

Renders all values of a specific dimension side by side. Only available for rocketstyle components.

export const States = stories.dimension('states')
export const Sizes = stories.dimension('sizes')

// Ignore specific values
export const States = stories.dimension('states', { ignore: ['default'] })

.render(callback)

Custom render function for full control.

export const Custom = stories.render((props) => (
  <div style={{ display: 'flex', gap: 16 }}>
    <Button {...props} state="primary" label="Primary" />
    <Button {...props} state="danger" label="Danger" />
  </div>
))

.list(options)

Renders a list of component instances using @vitus-labs/elements List.

export const ItemList = stories.list({
  data: ['Apple', 'Banana', 'Cherry'],
  valueName: 'label',
})

Chaining Methods

All chaining methods return a new builder instance.

.attrs(props)

Set default props for all stories.

stories.attrs({ label: 'Button', size: 'md' })

.controls(config)

Define Storybook arg table controls.

stories.controls({
  label: { type: 'text', value: 'Click me' },
  disabled: { type: 'boolean', value: false },
  size: { type: 'select', options: ['sm', 'md', 'lg'], value: 'md' },
})

.storyOptions(options)

Configure story layout rendering.

stories.storyOptions({
  direction: 'inline',  // 'inline' | 'rows'
  alignX: 'left',       // 'left' | 'center' | 'right' | 'spaceBetween'
  alignY: 'center',     // 'top' | 'center' | 'bottom' | 'spaceBetween'
  gap: 24,              // spacing between items
  pseudo: true,         // show pseudo-state controls (hover, focus, etc.)
})

.config(options)

Update general configuration.

stories.config({
  name: 'CustomStoryName',
  decorators: [NewDecorator],
})

.replaceComponent(component)

Swap the component being showcased.

stories.replaceComponent(EnhancedButton)

.decorators(decorators)

Add Storybook decorators.

stories.decorators([ThemeDecorator, LayoutDecorator])

Rocketstyle Integration

For rocketstyle components, rocketstories automatically:

  1. Detects all dimensions via getStaticDimensions()
  2. Generates controls for pseudo-states (hover, focus, pressed, active)
  3. Groups rocketstyle-specific controls under "Rocketstyle (Vitus-Labs)"
  4. Enables .dimension() stories for each registered dimension

Plain React Components

Non-rocketstyle components work with .main(), .render(), and .list(). The .dimension() method returns null for plain components.

Peer Dependencies

| Package | Version | | ------- | ------- | | react | >= 19 | | @storybook/react | * | | @vitus-labs/core | * | | @vitus-labs/rocketstyle | * | | @vitus-labs/unistyle | * |

License

MIT