prism-theme-jetbrains-dark
v1.0.0
Published
JetBrains Islands Dark theme object for Prism syntax highlighters.
Downloads
19
Maintainers
Readme
prism-theme-jetbrains-dark
JetBrains Islands Dark theme object for Prism-compatible syntax highlighters, including react-syntax-highlighter.
The color and editor typography tokens are mapped from JetBrains' official Islands Dark UI theme and editor color scheme:
- https://github.com/JetBrains/intellij-community/blob/master/platform/platform-resources/src/themes/islands/ManyIslandsDark.theme.json
- https://github.com/JetBrains/intellij-community/blob/master/platform/platform-resources/src/themes/islands/IslandSchemeDark.xml
Install
pnpm add prism-theme-jetbrains-darkUsage
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { jetbrainsDark } from 'prism-theme-jetbrains-dark';
export function CodeBlock({ code }: { code: string }) {
return (
<SyntaxHighlighter language="php" style={jetbrainsDark}>
{code}
</SyntaxHighlighter>
);
}Exports
jetbrainsDark: Prism style object.jetbrainsDarkLineNumberStyle: line-number style object forreact-syntax-highlighter.jetbrainsDarkColors: shared JetBrains Islands Dark color tokens.jetbrainsDarkTypography: JetBrains Mono editor typography tokens.
