Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/mdx2-csf

Package Overview
Dependencies
Maintainers
31
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/mdx2-csf

MDXv2 to CSF webpack compiler and loader

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
31
Created

What is @storybook/mdx2-csf?

The @storybook/mdx2-csf npm package is designed to convert MDX (Markdown for JSX) files into Component Story Format (CSF) used by Storybook. This allows developers to write their stories in MDX format, which combines Markdown with JSX, and then automatically convert these stories into the format that Storybook can understand and use to render components in its UI.

What are @storybook/mdx2-csf's main functionalities?

Convert MDX to CSF

This feature allows developers to convert MDX content directly into CSF format. The code sample demonstrates how to import the conversion function and use it to transform an MDX string that includes a component story into valid CSF.

import { mdxToCsf } from '@storybook/mdx2-csf';

const mdxContent = `
<Meta title='MyComponent' component={MyComponent} />

# MyComponent

<Story name='Example'>
  <MyComponent />
</Story>
`;

const csfContent = mdxToCsf(mdxContent);
console.log(csfContent);

Other packages similar to @storybook/mdx2-csf

FAQs

Package last updated on 09 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc