Public
Edited
Nov 27, 2023
Importers
Insert cell
Insert cell
Insert cell
values
Insert cell
Insert cell
valuesObjOnly
Insert cell
Insert cell
function inputsGroup(views, names, args) {
const form = html`<div class="inputs-group">${views.map(
(row) =>
html`<div class="inputs-group-row">${row.map(
(input) =>
html`<div class="inputs-group-cell" style="display:inline-block;min-width:200px;padding-left:20px;">${input}</div>`
)}</div>`
)}</div>`;

form.oninput = () => {
const values = views.map((row) => row.map((input) => input.value));
form.value = values;

if (args && args.objOnly) form.value = {};
if (names) {
names.forEach((row, i) =>
row.forEach(
(c, j) => values[i][j] != null && (form.value[c] = values[i][j])
)
);
}
};
form.oninput();
return form;
}
Insert cell
viewof range = Inputs.range([0, 100], {label: "Amount", step: 1})
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