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:
<buttondata-design-type="Poster"data-api-key="API KEY GOES HERE"class="canva-design-button"style="display: none;">Design with Canva</button><script>(function (c, a, n) {var w = c.createElement(a),s = c.getElementsByTagName(a)[0];w.src = n;s.parentNode.insertBefore(w, s);})(document, "script", "https://sdk.canva.com/designbutton/v2/api.js");</script>
jsx
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.