Skip to the content

Jisho辞書

The words of JMdict looked up by reading, written form, English meaning, a kanji in them or romaji, in small pieces fetched as needed, safe by default or unfiltered with every sense's marks, and the school grades, JLPT levels, readings, meanings and look-alike pairs of 2,999 kanji, each table an entry point of its own.

Jisho is the Japanese word 辞書 for a dictionary: this one holds Japanese words and kanji. About the name

Contents

Reference · Stroke order from KanjiVG: draw it, and find a kanji by drawing it

strokeOrderSvgfunction

The strokes as an SVG, text a page can put in an element or a server can send: each stroke is a path, and with animate each is written in its turn with CSS that the SVG carries, so that it needs no script and works where an <img> does not. A reader whose device asks for less motion is shown every stroke at once.

Import it

import { strokeOrderSvg } from "@johnmorrisdotca/jisho/strokes";

Definition

function strokeOrderSvg(strokes: readonly string[], options?: StrokeOrderOptions): string

Parameters

NameTypeDescription
strokesreadonly string[]

The paths of the strokes in order, from strokesOf.

options (optional)StrokeOrderOptions

Size, motion, numbers, colour and label.

Returns

string

The SVG; an empty drawing for no strokes.

Examples

import { loadStrokes, strokeOrderSvg, strokesOf } from "@johnmorrisdotca/jisho/strokes";

const svg = strokeOrderSvg(strokesOf(await loadStrokes("日"), "日"), { size: 120 });
console.log(svg.startsWith("<svg")); // true
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jisho 2.11.0.