Custom actions
Tip: We've designed the built in formulas and actions so that virtually any problem can be solved without having to write a single line of code! Reach out to our toddle discord to discuss solving your problem without code.
Create a custom action.
Step 1
![Open the custom code section on the left panel](http://images.ctfassets.net/lizv2opdd3ay/6OurXQZEKVP4JratFwukIn/1eae7334ca92029e66c4a5e9ecea9d6e/Screenshot_2023-09-21_at_19.23.02.png)
Step 2
![Now click the (+) button next to](http://images.ctfassets.net/lizv2opdd3ay/36d5JJNa91nL2eJ3MNSdJU/93a3490c81852203b4a9aba39a1f9399/Screenshot_2023-09-22_at_18.19.32.png)
Step 3
![async function confetti(args, ctx) {
const cavasConfetti = await import('https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/+esm');
cavasConfetti.default();
}](http://images.ctfassets.net/lizv2opdd3ay/3IXuoQa9ADXnTGrpkm51dw/054b9f2bfd766ff30db63d111f306bca/Screenshot_2023-09-22_at_18.30.18.png)
Step 4
Arguments
![Add arguments that your action can take as input.](http://images.ctfassets.net/lizv2opdd3ay/CG0tzycQhTuM9tZzNvGao/cb6d2723918eba2a35a4f19aafc6fff5/Screenshot_2023-09-22_at_18.34.12.png)
![Update code to pass args as the options for canvas-confetti. Also, post the number of particles to the console for debug purposes.](http://images.ctfassets.net/lizv2opdd3ay/2wGDw7MCAUIL7u7dhWBRvX/372d269a3769a8ee269faadfae7b6f49/Screenshot_2023-09-22_at_18.37.50.png)
Events
![screenshot of the events section in custom actions](http://images.ctfassets.net/lizv2opdd3ay/5A7z0B9JRmz6OWriTxflyi/9048cae046aab3929802da5c877698fc/Screenshot_2024-02-06_at_11.55.15.png)
![ctx.triggerActionEvent(](http://images.ctfassets.net/lizv2opdd3ay/3lBd8S1lpeG0PpTtwTVZna/4e95e1778cf9ba7fe1a78b4659bad674/Screenshot_2023-09-22_at_18.58.09.png)
All done ๐
![Preview of the final action](http://images.ctfassets.net/lizv2opdd3ay/5JXqmrZJLPYWVGfo7ZmGmO/13ba49eac483658506b156be59f028ee/confetti.jpg)