Bushu documentation
Bushu 部首 — Find kanji by their radicals
Choose the parts you can see in a kanji, intersect their matches, and add a radical picker to your page.
Install
npm install @johnmorrisdotca/bushu
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/Radical index and provenance · 1 exports | 60.0 kB | |
@johnmorrisdotca/Japanese radical names · 6 exports | 5.6 kB | |
@johnmorrisdotca/Kanji stroke counts · 3 exports | 17.1 kB | |
@johnmorrisdotca/Native radical picker · 13 exports | The radical picker for a page: mountBushu draws the grid of parts by stroke count and the kanji that hold the parts chosen into any element, loadBushuData fetches the data it shows, and the words (BUSHU_STRINGS) and the style (BUSHU_STYLE) are here to read or replace. | 89.7 kB |
@johnmorrisdotca/Radical picker element · 4 exports | 91.7 kB | |
@johnmorrisdotca/Register the picker · 4 exports | 91.7 kB | |
@johnmorrisdotca/Radical intersection and display forms · 14 exports | Bushu 部首, the radical lookup: find a kanji by the parts it is made of, with no page and no data needed. | 0.9 kB |
Guides
How-to
- Intersect chosen partsUse RADKFILE keys, preserve native ordering and interpret empty results.
- Keep lookup keys and display shapes distinctUse native stand-in forms and school names without losing ambiguous radical identities.
- Group parts and sort kanji by strokesApply the two native radical corrections separately from kanji stroke-count lookup.
- Control the native pickerUse native mount methods, result limits, callbacks and cleanup.
- Use your own part indexKeep native Radical fields and make names and stroke metadata optional.
- Embed a radical pickerChoose the native element, frame or host mount and preserve event boundaries.