Skip to content

Code

Displays syntax highlighted text via shiki

console.log('Hello, world!')
↓ Import the component
import {Code} from 'react-exo/code';
↓ Try the example
<Code lang="typescript"> {`console.log('Hello, world!')`} </Code>

Technology

PlatformLibrarySupportNotes
WebshikiOniguruma Engine (WASM)
Androidreact-native-shiki-engineOniguruma Engine (JSI)
iOSreact-native-shiki-engineOniguruma Engine (JSI)
MacOSshikiJS Engine
WindowsshikiJS Engine