Quick start
Canva's app development platform allows anyone to create apps that enhance Canva. This quick start guide explains how to get an app up and running in a matter of minutes.
Before you begin
To follow this guide, you'll need to:
- Sign up for a Canva.com account.
- Install git, Node.js v20.10.0, and npm v10.
- Learn the fundamentals of TypeScript, React, and webpack.
If you need help with any of these prerequisites, including how to set up the required tooling, see Prerequisites.
Step 1: Create an app via the Developer Portal
-
Log in to the Developer Portal.
-
Navigate to the Your apps page.
-
Click Create an app.
-
Select a target audience for the app:
- Public: You can make your app available to all of Canva's users, but the app will need to be reviewed by Canva and meet the requirements outlined in the submission checklist.
- Restrict to your team: The app can only be made available to members of the current team, and the team's administrators are responsible for reviewing it.
-
Agree to the terms and conditions.
-
Click Create.
Step 2: Set up the starter kit
-
Clone the following repo:
git clone https://github.com/canva-sdks/canva-apps-sdk-starter-kit.gitbashThis repo contains the starter kit for the Apps SDK. The starter kit is a boilerplate for an app and all of the tooling we recommend. To learn more about the starter kit, see Setting up the starter kit.
-
Navigate into the cloned directory for the starter kit:
cd canva-apps-sdk-starter-kitbash -
Install the dependencies:
npm installbash -
Start the local development server:
npm run startbashThe local development server starts running at http://localhost:8080, but you can't use this URL to view the local preview, see the next step instead.
Step 3: Preview the app
This step explains how to use Canva to view the app running locally at http://localhost:8080.
- In the Developer Portal, navigate to the app’s Configure your app page.
- Select App source > Development URL.
- In the Development URL field, enter the URL of the development server.
- To open the app in a new tab, click Preview.
- To install the app, click Open.
The example app includes a button that responds with "Hello world" when clicked:
To learn more about how to preview apps, including how to set up live reloading, see Previewing apps.
Step 4: Start editing code
You can quickly get started by editing the example app demonstrated above.
Use a code editor to open src/app.tsx
. This file contains placeholder code that you can edit to start building your app.
In the following example, a button click triggers the addNativeElement method, adding a new text layer to the Canva design with the words "Hello world!".
import { Button, Rows, Text } from "@canva/app-ui-kit";import { addNativeElement } from "@canva/design";import * as styles from "styles/components.css";export const App = () => {const onClick = () => {addNativeElement({type: "TEXT",children: ["Hello world!"],});};return (<div className={styles.scrollContainer}><Rows spacing="2u"><Text>To make changes to this app, edit the <code>src/app.tsx</code> file,then close and reopen the app in the editor to preview the changes.</Text><Button variant="primary" onClick={onClick} stretch>Do something cool</Button></Rows></div>);};
Next steps
- You can use various Canva APIs to add functionality to your app. For more information, see Integrating with Canva.
- If you plan to submit your app to the Apps Marketplace, you can prepare by reading the following: