Reference
Picker element
import { … } from "@johnmorrisdotca/tane/element";
4.3 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
definePicker | function | Defines the picker or a subclass under a host's tag; safe on a server. |
parsePickerItems | function | Reads a bounded list, one item per line or a JSON string array. |
TANE_EMBED_OPTION_KEYS | constant | Actual host option keys, checked by the builder. |
TanePickDetail | type | Native event detail: list indices instead of names or other item text. |
TanePicker | class | A seeded item picker and group maker, using the native random and draw functions. |
TanePickerMode | type | The picker modes: sample without replacement, shuffled list or balanced groups. |
TanePickerOptions | type | Host data, a native random stream, optional weights and a result callback. |