• Version 7.0.18
  • Published
  • 13.5 kB
  • 6 dependencies
  • MIT license


npm i @storybook/channel-postmessage
yarn add @storybook/channel-postmessage
pnpm add @storybook/channel-postmessage


Storybook PostMessage Channel is a channel for Storybook that can be used when the Storybook Renderer runs inside an iframe or a child window. A channel can be created using the `createChannel` function.



variable KEY

const KEY: string;


    function createChannel

    createChannel: ({ page }: Config) => Channel;
    • Creates a channel which communicates with an iframe or child window.


    class PostmsgTransport

    class PostmsgTransport {}


      constructor(config: Config);

        method send

        send: (event: ChannelEvent, options?: any) => Promise<any>;
        • Sends event to the associated window. If the window does not yet exist the event will be stored in a buffer and sent when the window exists.

          Parameter event

        method setHandler

        setHandler: (handler: ChannelHandler) => void;

          Package Files (1)

          Dependencies (6)

          Dev Dependencies (1)

          Peer Dependencies (0)

          No peer dependencies.


          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/channel-postmessage.

          • Markdown
          • HTML
            <a href="https://www.jsdocs.io/package/@storybook/channel-postmessage"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>