Published
Edited
Apr 13, 2021
Importers
1 star
Insert cell
Insert cell
Insert cell
Insert cell
html`
<main class="${tw`font-sans bg-purple-400 p-8 flex items-center justify-center`}">
<h1 class="${tw`font-bold text(center 5xl white sm:gray-800 md:pink-700)`}">This is Twind!</h1>
</main>
`
Insert cell
html`
<div class="${tw`pb-3 space-y-3 flex flex-col`}">
<input class="${tw`form-input rounded-lg border-gray-300`}" type="text" placeholder="first name" />
<input class="${tw`form-input rounded-lg border-gray-300`}" type="text" placeholder="last name" />
</div>
`
Insert cell
Insert cell
// Reference: https://twind.dev/docs/handbook/advanced/setup.html
tw = twind.setup({
...withTwindScopedOptions(),
theme: {
extend: {
colors: {
gray: twind.colors.trueGray,
},
fontFamily: {
serif: ["var(--serif)"],
},
},
},
plugins: {
"form-checkbox": twind.forms.formCheckbox,
"form-field": twind.forms.formField,
"form-file": twind.forms.formFile,
"form-input": twind.forms.formInput,
"form-radio": twind.forms.formRadio,
"form-select": twind.forms.formSelect,
"form-textarea": twind.forms.formTextarea,
},
})
Insert cell
Insert cell
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