Published
Edited
Apr 26, 2020
Importers
Insert cell
Insert cell
//import {labeledInput} from "@otaviocv/labeled-input"
Insert cell
labeledInput = ({type, label = '', value} = {}) => {
let wrapper = html`<label></label>`
let input = html`<input type=${type}>`
wrapper.append(input)
wrapper.append(label || '')
input.value = value
input.addEventListener('change', (e) => {
wrapper.value = input.value
wrapper.dispatchEvent(new CustomEvent('input'))
})
// we need to have a starting value
wrapper.value = input.value
return wrapper
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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