⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

React component for code snippets highlight and preview.

Notifications You must be signed in to change notification settings

open-draft/react-cdx

Repository files navigation

React CDX

Code snippet rendering and interaction library for React.

Features

  • 💅 Styling-agnostic (raw CSS, CSS-in-JS, pre-built themes).
  • 🎯 Focused lines.
  • 💎 Interactive code tokens.

Getting started

npm install react-cdx
import React from 'react'
import { Code } from 'react-cdx'

export function Example() {
  return (
    <Code
      code={`
function multiply(a, b) {
  return a * b
}
    `}
    />
  )
}

About

React component for code snippets highlight and preview.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •