# Trying to learn how to make simple buttons in p5js

**URL:** <https://discourse.processing.org/t/trying-to-learn-how-to-make-simple-buttons-in-p5js/34014>\
**Category:** Coding Questions\
**Created:** [December 9, 2021, 11:06am UTC](https://discourse.processing.org/t/trying-to-learn-how-to-make-simple-buttons-in-p5js/34014 "2021-12-09T11:06:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parichko](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@parichko](https://discourse.processing.org/u/parichko)\
**Post date:** [December 9, 2021, 11:06am UTC](https://discourse.processing.org/t/trying-to-learn-how-to-make-simple-buttons-in-p5js/34014/1 "2021-12-09T11:06:27Z")

</div>

i am trying to learn how to make a simple button that prints hello in p5js or something else simple but when i tried to do it my self it didn’t work. Can someone just show me the code of a button that prints smth(or anything else) so i can see how buttons work

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 9, 2021, 11:59am UTC](https://discourse.processing.org/t/trying-to-learn-how-to-make-simple-buttons-in-p5js/34014/2 "2021-12-09T11:59:37Z")

</div>

[p5js.org/reference/#/p5/createButton](http://p5js.org/reference/#/p5/createButton)  
[p5js.org/reference/#/p5.Element/mousePressed](http://p5js.org/reference/#/p5.Element/mousePressed)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [December 9, 2021, 1:50pm UTC](https://discourse.processing.org/t/trying-to-learn-how-to-make-simple-buttons-in-p5js/34014/3 "2021-12-09T13:50:13Z")

</div>

Hello,

Take a look here:  
[https://p5js.org/](https://p5js.org/)

`:)`
