← Back to blog1 min read
Getting Started with Affinity Scripts
Learn how to run JavaScript scripts in Affinity by Canva.

Affinity by Canva ships with a built-in JavaScript scripting engine. This short post will get you started.
Prerequisites
Please consult the Affinity official documentation on how to run scripts in Affinity.
Your First Script
Open Affinity and go to Window > Scripting > Script Editor. Paste this:
alert('Hello Affinity!');
Click Run and you should see an Alert saying Hello Affinity!.
What’s Next
- Check out the Affinity Scripting Tutorial
- Learn about the document model
- Explore the layer API
- Check out the scripts collection for ready-to-use examples