observable-framework-input-radio
Input: Radio
Observable Framework documentation: Input: Radio Source: https://observablehq.com/framework/input-radio
API · Source · The radio input allows the user to choose one of a given set of values. (See the checkbox input for multiple-choice.) A radio 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.
const color = view(Inputs.radio(["red", "green", "blue"], {label: "color"}));
color
Note that a radio cannot be cleared by the user once selected; if you wish to allow no selection, include null in the allowed values.
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