Unlisted
Edited
Jun 16, 2023
1 star
Insert cell
Insert cell
// Inputs = require("@observablehq/inputs@0.10.5")
Insert cell
Inputs.version
Insert cell
Insert cell
viewof s = Inputs.search(["red", "дом", "чудо", "Река Дон"], {query: "до"});
Insert cell
s // should be: ["дом", "Река Дон"]
Insert cell
Insert cell
date = new Date("2023-06-01T12:00:00")
Insert cell
viewof newdatetime = Inputs.datetime({value: date});
Insert cell
+newdatetime === +date
Insert cell
Insert cell
viewof form = {
const form = Inputs.form({
option1: Inputs.checkbox(["A", "B"], { label: "Select some" }),
option2: Inputs.range([0, 100], { label: "Amount", step: 1 }),
option3: Inputs.radio(["A", "B"], { label: "Select one" }),
option4: Inputs.select(["A", "B"], { label: "Select one" })
});
form.oninput = e => mutable debug = e.currentTarget.value;
return form;
}
Insert cell
mutable debug = ({})
Insert cell
form
Insert cell
Insert cell
Inputs.radio([new Date(2020, 0, 1), new Date(2021, 6, 11)], {
keyof: (d) => d.getFullYear()
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more