Skip to the content

Bushu部首

Choose the parts you can see in a kanji, intersect their matches, and add a radical picker to your page.

Bushu is the Japanese word 部首 for a kanji radical. About the name

Contents

Reference · Native radical picker

loadBushuDatafunction

Loads the data a picker shows, each module at the moment it is asked for, so that a page which never opens a picker never loads it: the radicals, the Japanese names and the strokes of a kanji. Hand the result to mountBushu:

const data = await loadBushuData();
mountBushu(element, { ...data, language: "ja" });

Import it

import { loadBushuData } from "@johnmorrisdotca/bushu/picker";

Definition

function loadBushuData(): Promise<Pick<BushuMountOptions, "radicals" | "names" | "strokes">>

Returns

Promise<Pick<BushuMountOptions, "names" | "strokes" | "radicals">>

The loaded native radical entries and name/stroke callbacks for mountBushu.

Examples

import { RADKFILE } from "@johnmorrisdotca/bushu/radkfile";
import { loadBushuData } from "@johnmorrisdotca/bushu/picker";

const radicals = RADKFILE.radicals;
console.log((await loadBushuData()).radicals.length);
253

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/bushu 1.1.0.