Published
Edited
May 27, 2020
Insert cell
md`# Input Misc


Just a grab bag of functions to import into other notebook related to inputs.`
Insert cell
function input_grid(inputs, title = md`# HI`, ncols = 3) {
const form = html`${title}<div class="inputs-group"
style="
display: grid;
grid-template-columns: repeat(${ncols}, 1fr);
gap: 15px;
width: 100%;"
>${inputs.map(({ input }) => html`<div>${input}</div>`)}</div>`;

form.oninput = () => {
form.value = {};
inputs.forEach(({ name, input }) => {
form.value[name] = input.value;
});
};
form.oninput();
return form;
}
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