Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

gatsby-remark-inline-codesandbox

Installation

yarn add gatsby-remark-inline-codesandbox

Setup

gatsby-plugin-mdx

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-mdx',
      options: {
        gatsbyRemarkPlugins: [
          {
            resolve: 'gatsby-remark-inline-codesandbox',
            options: {
              mode: 'button',
            },
          },
        ],
      },
    },
  ],
};

gatsby-transformer-remark

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-transformer-remark',
      options: {
        plugins: [
          {
            resolve: 'gatsby-remark-inline-codesandbox',
            options: {
              mode: 'button',
            },
          },
        ],
      },
    },
  ],
};

Usage & Documentation

See the remark-codesandbox package for more information.