
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
chatsql-thememirror
Advanced tools
Beautiful themes for CodeMirror
npm install thememirror
import {EditorView} from '@codemirror/view';
import {EditorState} from '@codemirror/state';
import {dracula} from 'thememirror';
const state = EditorState.create({
doc: 'my source code',
extensions: [dracula],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
Author: William D. Neumann
import {amy} from 'thememirror';
Author: Konstantin Pschera
import {ayuLight} from 'thememirror';
Author: unknown
import {barf} from 'thememirror';
Author: Michael Diolosa
import {bespin} from 'thememirror';
Author: Joe Bergantine
import {birdsOfParadise} from 'thememirror';
Author: unknown
import {boysAndGirls} from 'thememirror';
Author: Fred LeBlanc
import {clouds} from 'thememirror';
Author: Jacob Rus
import {cobalt} from 'thememirror';
Author: unknown
import {coolGlow} from 'thememirror';
Author: Zeno Rocha
import {dracula} from 'thememirror';
Author: TextMate
import {espresso} from 'thememirror';
Author: Liviu Schera
import {noctisLilac} from 'thememirror';
Author: Rosé Pine
import {rosePineDawn} from 'thememirror';
Author: Kenneth Reitz
import {smoothy} from 'thememirror';
Author: Ethan Schoonover
import {solarizedLight} from 'thememirror';
Author: Chris Kempson
import {tomorrow} from 'thememirror';
Create your own theme.
Type: 'light' | 'dark'
Theme variant. Determines which styles CodeMirror will apply by default.
Type: string
Editor background.
Type: string
Default text color.
Type: string
Caret color.
Type: string
Selection background.
Type: string
Background of highlighted lines.
Type: string
Gutter background.
Type: string
Text color inside gutter.
Type: TagStyle[]
Array of styles to customize syntax highlighting. See TagStyle
for a list of available tags to style.
import {createTheme} from 'thememirror';
import {EditorView} from '@codemirror/view';
import {EditorState} from '@codemirror/state';
const myTheme = createTheme({
variant: 'dark',
settings: {
background: '#00254b',
foreground: '#fff',
caret: '#fff',
selectionBackground: '#b36539bf',
gutterBackground: '#00254b',
gutterForeground: '#ffffff70',
lineHighlight: '#00000059',
},
styles: [
{
tag: t.comment,
color: '#0088ff',
},
],
});
const state = EditorState.create({
doc: 'my source code',
extensions: [myTheme],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
FAQs
Beautiful themes for CodeMirror
We found that chatsql-thememirror demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.