HTML5 canvas TextPath Tutorial

To create a text path with Konva, we can instantiate a Konva.TextPath() object.

For a full list of attributes and methods, check out the Konva.TextPath documentation.

Konva TextPath Demoview raw
<!DOCTYPE html>
<script src=""></script>
<meta charset="utf-8">
<title>Konva TextPath Demo</title>
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #F0F0F0;
<div id="container"></div>
var width = window.innerWidth;
var height = window.innerHeight;

var stage = new Konva.Stage({
container: 'container',
width: width,
height: height

var layer = new Konva.Layer();

var textpath = new Konva.TextPath({
x: 0,
y: 50,
fill: '#333',
fontSize: 16,
fontFamily: 'Arial',
text: 'All the world\'s a stage, and all the men and women merely players.',
data: 'M10,10 C0,0 10,150 100,100 S300,150 400,50'


// add the layer to the stage