# \[Phaser3\] Dynamic Textbox

**URL:** <https://phaser.discourse.group/t/phaser3-dynamic-textbox/10465>\
**Category:** Examples\
**Created:** [October 18, 2021, 6:18pm UTC](https://phaser.discourse.group/t/phaser3-dynamic-textbox/10465 "2021-10-18T18:18:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NickHatBoecker](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/nickhatboecker/32/5380_2.png) [@NickHatBoecker](https://phaser.discourse.group/u/NickHatBoecker)\
**Post date:** [October 18, 2021, 6:18pm UTC](https://phaser.discourse.group/t/phaser3-dynamic-textbox/10465/1 "2021-10-18T18:18:03Z")

</div>

Hey y’all,

I’m developing a top down adventure and what is an adventure without text?  
So I came across the problem that I wanted to show some textboxes, but without setting the size manually everytime.

I came up with a DynamicTextbox class, which acts as a Phaser Container.  
Here’s the CodePen if anyone needs something like that:

https://codepen.io/NickHatBoecker/embed/preview/GRvogWZ?default-tabs=js%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=GRvogWZ

---

<div class="post-metadata">

**Author:** ![Maup-Maup](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/maup-maup/32/5734_2.png) [@Maup-Maup](https://phaser.discourse.group/u/Maup-Maup)\
**Post date:** [October 18, 2021, 7:58pm UTC](https://phaser.discourse.group/t/phaser3-dynamic-textbox/10465/2 "2021-10-18T19:58:47Z")

</div>

So cool. Thanks for sharing!  
As a beginner I learned a lot from your code.
