Reference · Radical picker element
BushuElementOptionstype
Host data and callbacks. Attribute choices override the host's initial selection.
Import it
import type { BushuElementOptions } from "@johnmorrisdotca/bushu/element";
Also exported from: @johnmorrisdotca/bushu/element/define
Definition
type BushuElementOptions = Partial<BushuMountOptions>;
Members
| Name | Type | Description |
|---|---|---|
radicals (optional) | readonly Radical[] | undefined | The radicals: |
names (optional) | ((key: string) => BushuNameEntry | null) | undefined | The Japanese name and English meaning of a radical by its key, or null: |
strokes (optional) | ((kanji: string) => number | null) | undefined | The strokes in a kanji, or null: |
language (optional) | BushuLanguage | undefined | The words: |
limit (optional) | number | undefined | The most matches drawn at once; past it the picker says to choose another part. Default 120. |
chosen (optional) | readonly string[] | undefined | Parts already chosen, by key or by shape; any the index does not have are dropped. |
kanji (optional) | string | undefined | A kanji whose card is open. |
onChange (optional) | ((detail: BushuEventDetail) => void) | undefined | |
onPick (optional) | ((detail: BushuEventDetail) => void) | undefined |
Examples
import type { BushuElementOptions } from "@johnmorrisdotca/bushu/element";
const options: BushuElementOptions = {};
console.log(Object.keys(options).length); // 00What it prints (run when this page was built)