@mihkeleidast/storybook-addon-source

Displays the source example of the current story
1,295,594
Install
npm install @mihkeleidast/storybook-addon-source
Latest Version:1.0.1
License:MIT
Last Updated:Mar 6, 2025
Links: GitHub  ·  npm
Maintainer: mihkeleidast

@mihkeleidast/storybook-addon-source

Installation

First, install the package.

npm install --save-dev @mihkeleidast/storybook-addon-source

Then, register it as an addon in .storybook/main.js.

// .storybook/main.ts

// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';

const config: StorybookConfig = {
  // ...rest of config
  addons: [
    '@storybook/addon-essentials'
    '@mihkeleidast/storybook-addon-source', // 👈 register the addon here
  ],
};

export default config;

Then, add the decorator in .storybook/preview.js.

// .storybook/preview.ts
import { Preview } from "@storybook/react";

import { withJsx } from '../dist/index.js'

const preview: Preview = {
  decorators: [
    withJsx, // 👈 add the decorator as the first one
    // ... rest of decorators
  ],
};

export default preview;

Related Packages

@codemirror/lang-vue

Vue template support for the CodeMirror code editor

71,371,417 29
storybook-addon-description

Add description to panel

55,979 1
babel-helper-vue-jsx-merge-props

babel helper for vue jsx spread.

13,911,770 31
babel-plugin-transform-vue-jsx

Babel plugin for Vue 2.0 JSX

5,479,185 1,847
babel-plugin-jsx-v-model

JSX v-model transform

3,509,004 155

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT