🦚 Beautiful themes for CodeMirror

Overview

ThemeMirror test

Beautiful themes for CodeMirror

Install

npm install thememirror

Usage

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,
});

Themes

Amy

Author: William D. Neumann

import {amy} from 'thememirror';

Ayu Light

Author: Konstantin Pschera

import {ayuLight} from 'thememirror';

Barf

Author: unknown

import {barf} from 'thememirror';

Bespin

Author: Michael Diolosa

import {bespin} from 'thememirror';

Birds of Paradise

Author: Joe Bergantine

import {birdsOfParadise} from 'thememirror';

Boys and Girls

Author: unknown

import {boysAndGirls} from 'thememirror';

Clouds

Author: Fred LeBlanc

import {clouds} from 'thememirror';

Cobalt

Author: Jacob Rus

import {cobalt} from 'thememirror';

Cool Glow

Author: unknown

import {coolGlow} from 'thememirror';

Dracula

Author: Zeno Rocha

import {dracula} from 'thememirror';

Espresso

Author: TextMate

import {espresso} from 'thememirror';

Noctis Lilac

Author: Liviu Schera

import {noctisLilac} from 'thememirror';

Rosé Pine Dawn

Author: Rosé Pine

import {rosePineDawn} from 'thememirror';

Smoothy

Author: Kenneth Reitz

import {smoothy} from 'thememirror';

Solarized Light

Author: Ethan Schoonover

import {solarizedLight} from 'thememirror';

Tomorrow

Author: Chris Kempson

import {tomorrow} from 'thememirror';

API

createTheme(options)

Create your own theme.

options

variant

Type: 'light' | 'dark'

Theme variant. Determines which styles CodeMirror will apply by default.

settings
background

Type: string

Editor background.

foreground

Type: string

Default text color.

caret

Type: string

Caret color.

selection

Type: string

Selection background.

lineHighlight

Type: string

Background of highlighted lines.

gutterBackground

Type: string

Gutter background.

gutterForeground

Type: string

Text color inside gutter.

styles

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,
});
You might also like...

Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.

Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.

Crayon Syntax Highlighter Supports multiple languages, themes, fonts, highlighting from a URL, local file or post text. Written in PHP and jQuery. Cra

Nov 26, 2022

Toolkit for authoring Nuxt Themes.

@nuxt-themes/config Toolkit for authoring Nuxt Themes. Features ✨ Lets you create a theme from any Nuxt project 📦 Handles theme.config.ts file 🎨 Off

Dec 6, 2022

jQuery Tabs Plugin. CSS Tabs with Accessible and Responsive Design. Lot of Tab Themes with Vertical and Horizontal Orientation.

Macaw Tabs Macaw Tabs is jQuery tabs plugin. It helps you to create accessible and responsive jQuery tabs by implementing the W3 design patterns for t

Dec 8, 2022

Themes for your linux desktop.

Themes for your linux desktop.

Nova-galactic-theme Inspired by the Nordic Darker theme, but adjusted for coherency and simplicity. The theme includes configs for cinnamon, gnome-she

Jan 2, 2023

Statichunt is a free open-source Jamstack directory that lists hundreds of themes, starters, and resources for Jamstack sites.

Statichunt Statichunt is an open-source directory that enlists hundreds of themes, starters, and resources for static site generators submitted by the

Dec 29, 2022

Placebo, a beautiful new language agnostic diagnostics printer! It won't solve your problems, but you will feel better about them.

Placebo, a beautiful new language agnostic diagnostics printer! It won't solve your problems, but you will feel better about them.

Placebo A beautiful new language agnostic diagnostics printer! ┌─[./README.md] │ 1 │ What is Placebo? · ───┬──── ·

Dec 16, 2022

Auth-Form-Design - Beautiful Auth Form Designed using React 🥰.

Auth-Form-Design - Beautiful Auth Form Designed using React 🥰.

🙋 Auth Form Design 🥳 Features 1. Check Your Password Strength 2. Can Use Suggested Password 3. Enjoy Responsive Design Getting Started with Create R

Dec 24, 2022

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Dec 28, 2022

Responsive Portfolio Website Using Html, Css and JavaScript, With a beautiful user interface

Responsive Portfolio Website Using Html, Css and JavaScript, With a beautiful user interface

Responsive Portfolio Website Alexa Watch it on youtube Responsive Portfolio Website Alexa Responsive Portfolio Website Using Html, Css and JavaScript,

Mar 11, 2022
Comments
  • This dependency was not found

    This dependency was not found

    This dependency was not found:
    
    * thememirror in ./src/common/composable/useCodeMirror.js
    
    To install it, you can run: npm install --save thememirror
    

    I can fix it like this

    import { solarizedLight } from 'thememirror/dist/index';
    

    Do You consider adding it

    // package.json
    {
       "main": "./dist/index.js"
    }
    
    opened by tomieric 1
  • No License?

    No License?

    Hi,

    Excellent themes, but there seems to be no license?

    Are there any restrictions on how these can be used? Is it OK to just plop them into our own projects?

    Bye! Mark

    opened by blitz-research 0
  • Dynamic theme reconfiguration

    Dynamic theme reconfiguration

    Is there any way to get theme and highlight separately to enable dynamic reconfigurations using Codemirror transactions and compartments?

    PS. Thememirror is great project!

    opened by hv6erT 0
Releases(v2.0.1)
  • v2.0.1(Jun 18, 2022)

  • v2.0.0(Jun 13, 2022)

    Highlights

    • ThemeMirror no longer depends on @codemirror/language, you need to install it yourself ed2ba16

    https://github.com/vadimdemedes/thememirror/compare/v1.1.0...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jun 13, 2022)

  • v1.0.0(Jun 1, 2022)

Owner
Vadim Demedes
Maker of apps and open source projects.
Vadim Demedes
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Beautiful and easily customizable themes for Roam Research.

Roam Studio Beautiful and easily customizable themes for Roam Research. More themes coming soon! If you want to support my work Become a GitHub Sponso

Alexander Rink 26 Dec 31, 2022
A CodeMirror (v6) extension for adding relative line numbers to your code editor

Relative Line Numbers for CM6 Installation yarn add codemirror-line-numbers-relative Usage import { EditorView } from "@codemirror/view"; import { Edi

Joe Previte 5 Feb 7, 2022
Additional themes for Lovelace Mushroom Cards 🍄

?? Mushroom Themes Mushroom themes allow you to customize your Mushroom dashboard using Home Assistant themes. ⚠️ It's only a theme! You need to insta

Paul Bottein 127 Dec 24, 2022
Collection of customizable Anki flashcard templates with modern and clean themes.

Anki Templates Collection of customizable Anki flashcard templates with modern and clean themes. About Features Themes Instructions Add-on support Com

Pranav Deshai 101 Dec 29, 2022
MDN-Dark-Mode - Simple extension to add a dark mode with different themes to the MDN Web Docs website

MDN-Dark-Mode Information Chrome and Firefox extension that adds a dark mode wit

Santiago Galán Barlo 2 Mar 18, 2022
Powershell scripts and Update script for Powershell configs and oh-my-posh themes

windows-powershell-autoconfig What is it? It is a NodeJS Project which updates your powershell and oh-my-posh scripts. Why should I use it? It is very

Skender Gashi 6 Dec 28, 2022
Render (GitHub Flavoured with syntax highlighting) Markdown, and generate CSS for each of GitHub’s themes.

render-gfm Render (GitHub Flavoured with syntax highlighting) Markdown, and generate CSS for each of GitHub’s themes. GitHub Repository npm Package Do

Shaun Bharat 12 Oct 10, 2022
🍎Transform an SVG icon into multiple themes, and generate React icons,Vue icons,svg icons

IconPark English | 简体中文 Introduction IconPark gives access to more than 2000 high-quality icons, and introduces an interface for customizing your icon

Bytedance Inc. 6.8k Jan 5, 2023