observable-framework-input-checkbox
Input: Checkbox
Observable Framework documentation: Input: Checkbox Source: https://observablehq.com/framework/input-checkbox
API · Source · The checkbox input allows the user to choose any of a given set of values. (See the radio input for single-choice.) A checkbox is recommended over a select input when the number of values to choose from is small — say, seven or fewer — because all choices will be visible up-front, improving usability. For zero or one choice, see the toggle input.
The initial value of a checkbox defaults to an empty array. You can override this by specifying the value option, which should also be an array (or iterable).
const colors = view(Inputs.checkbox(["red", "green", "blue"], {label: "color"}));
colors
A checkbox’s values need not be strings: they can be anything. Specify a format function to control how these values are presented to the reader.
More from spqw/skill-observable-framework
observable-framework-lib-deckgl
Using Deck.gl in Observable Framework for large-scale geospatial data visualization.
11observable-framework-lib-mapbox-gl
Using Mapbox GL JS in Observable Framework for vector tile maps.
4observable-framework-jsx
Using JSX (React components) in Observable Framework pages.
3observable-framework-files
Working with files in Observable Framework — file attachments, file-based routing, and FileAttachment API.
3observable-framework-input-range
Range slider input component in Observable Framework — select a numeric value.
3observable-framework-lib-tex
Using TeX/LaTeX in Observable Framework for mathematical typesetting.
3