JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://raw.githubusercontent.com/treinaweb/treinaweb-front-playground/standalone/tw-playground.min.css">
<div id="root" ></div>
CSS
.box-container{
box-sizing: border-box;
border: 2px solid black;
background-color: #0265ad;
}
.box-content{
position: relative;
height: 0;
width: 50%;
border: 2px solid black;
background-color: #a2cff0;
}
JavaScript
window.twPlaygroundData = {
html: {
initial: `
<div class="box-container" >
<div class="box-content"></div>
</div>
`,
controllers: [
]
},
css: {
initial: `
`,
controllers: [
{
selector: '.box-container',
avoidHighlight: true,
props: [
{
name: 'width',
value: '100',
valueSuffix: "px",
type: 'range',
properties: [
{
name: 'min',
value: '50'
},
{
name: 'max',
value: '300'
},
{
name: 'step',
value: '10'
}
]
}
]
},
{
selector: '.box-content',
avoidHighlight: true,
props: [
{
name: 'width',
value: '50px',
type: 'string'
},
{
name: 'height',
value: '0',
type: 'string'
},
{
name: 'padding-bottom',
value: '50',
valueSuffix: "%",
type: 'range',
properties: [
{
name: 'min',
value: '10'
},
{
name: 'max',
value: '100'
...