Reference · Stroke order from KanjiVG: draw it, and find a kanji by drawing it
StrokeOrderOptionstype
How a drawing of the strokes looks and moves.
Import it
import type { StrokeOrderOptions } from "@johnmorrisdotca/jisho/strokes";
Definition
type StrokeOrderOptions = {
readonly size?: number;
readonly animate?: boolean;
readonly numbers?: boolean;
readonly strokeMs?: number;
readonly color?: string;
readonly label?: string;
};
Members
| Name | Type | Description |
|---|---|---|
size (optional) | number | undefined | The width and height in pixels. 109 unless given. |
animate (optional) | boolean | undefined | Write the strokes one after the other. On unless |
numbers (optional) | boolean | undefined | Draw each stroke's number at its start. Off unless |
strokeMs (optional) | number | undefined | How long one stroke takes to write, in milliseconds. 500 unless given. |
color (optional) | string | undefined | The colour of the strokes, as CSS has it. |
label (optional) | string | undefined | What the drawing says to a screen reader. "Stroke order" unless given. |
Examples
import type { StrokeOrderOptions } from "@johnmorrisdotca/jisho/strokes";
const options: StrokeOrderOptions = { size: 200, numbers: true, strokeMs: 400 };
console.log(options.size);200What it prints (run when this page was built)