本文へ移動

Bushu部首

漢字に見える部品を選び、全てを含む漢字を探し、ページに部首選択を追加できます。

「部首」は、漢字を分類する部分です。 名前について(英語)

目次

リファレンス

標準の部首選択

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

最小化と gzip 圧縮をしたサイズは 89.7 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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. A separate entry (@johnmorrisdotca/bushu/picker), so a server never loads any of it.

エクスポート

名前種類概要
BUSHU_RESULT_LIMIT定数The most matches a picker draws unless limit says.
BUSHU_STRINGS定数Native English and Japanese radical-picker controls, results and accessible announcements.
BUSHU_STYLE定数THE STYLE a Bushu picker wears (mountBushu, <bushu-picker>): its colours as custom properties on .bushu, its boxes, its tiles and its chips.
BushuEventDetail型What a picker tells of itself, in bushu-change and bushu-pick events and to the callbacks.
BushuLanguage型THE WORDS BUSHU SAYS, in English and Japanese: what the picker's buttons and lines of words say, and what a screen reader hears.
bushuLanguageOf関数The language a lang attribute asks for: Japanese for any ja, English for everything else.
BushuMount型What mountBushu gives back: methods for everything a button does, and destroy.
BushuMountOptions型The native radical data, optional names/strokes, language, result limit, initial selection and host callbacks.
BushuNameEntry型The names a picker shows beside a radical: what radicalNameEntry from /names returns.
bushuSay関数A line in a language, with its {name} values filled in, and its One form when n is 1.
ensureBushuStyle関数Puts the picker's style in the page once.
loadBushuData関数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.
mountBushu関数Native interface, settings and words for host code.

ソースを見るGitHub で編集@johnmorrisdotca/bushu 1.1.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。