Too Long; Didn't Read
JavaScript recreates the iconic Mr. Potato Head in JavaScript. We will have all his parts, which we can drag on his body. The result of today's article is this amazing Codepen. With a simple HTML setup we have a fairly simple setup. We use flexbox to center our two divs. The Parts container is then relative, and we add a small border to make it look nicer. The draggable function is used to change the left and top position of our part. And Set the z-index higher so it's on top.