JSFiddle - React, Tailwind, and code Playground

by victorrseloy

HTML

<div id="container"></div>

JavaScript

var stage = new Kinetic.Stage({
    container: 'container',
    width: 500,
    height: 600
});

var layer = new Kinetic.Layer();

var text = new Kinetic.text({
    x:100,
    y:60,
    text: 'Hello World',
    fontSize: 18,
    fontFamily: 'Calibri',
    width: 380,
    paddin: 20,
    align 'center'
});

var rect = Kinetic.Rect({
    x: 100,
    y: 60,
    stroke: '#555',
    strokeWidth: 4,
    fill: '#555',
    width: text.getWidth(),
    height: text.getHeight()
});

layer.add(rect);
layer.add(text);
stage.add(layer);