Creating designs

Create a design with the HTML API.

If you followed the steps for creating a Canva Button with the HTML API, the generated code provides a Button that, when clicked, creates a new design in the Canva editor:

data-api-key="API KEY GOES HERE"
style="display: none;"
>Design with Canva</button
(function (c, a, n) {
var w = c.createElement(a),
s = c.getElementsByTagName(a)[0];
w.src = n;
s.parentNode.insertBefore(w, s);
})(document, "script", "");

The presence of the data-design-type attribute on the button element tells Canva that clicking the Button should create a new design.

The value of the data-design-type attribute determines the design type of the created design. The design type determines:

  • the dimensions of the design
  • the templates that Canva shows to the user

For a complete list of the supported design types, refer to Design types.