# How to set the minimum width of an element?

**URL:** <https://community.penpot.app/t/how-to-set-the-minimum-width-of-an-element/5077>\
**Category:** Ask the community\
**Tags:** design\
**Created:** [April 16, 2024, 2:20pm UTC](https://community.penpot.app/t/how-to-set-the-minimum-width-of-an-element/5077 "2024-04-16T14:20:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjerukare](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/anjerukare/32/4886_2.png) [@anjerukare](https://community.penpot.app/u/anjerukare)\
**Post date:** [April 16, 2024, 2:20pm UTC](https://community.penpot.app/t/how-to-set-the-minimum-width-of-an-element/5077/1 "2024-04-16T14:20:47Z")

</div>

Hi!

Does anyone know how to set the minimum width of an element?

I’ll give a little context. In the Penpot user guide, one can find [How to create a button](https://help.penpot.app/user-guide/flexible-layouts/#layouts-flex-examples) example. I want to set the minimum width of the button that was created in this example. How can I do this?

I have tried many ways to get the desired result, but nothing has worked for me.

---

<div class="post-metadata">

**Author:** ![Evgeny\_Pirogov](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/evgeny_pirogov/32/5185_2.png) [@Evgeny\_Pirogov](https://community.penpot.app/u/Evgeny_Pirogov)\
**Post date:** [July 19, 2024, 4:02am UTC](https://community.penpot.app/t/how-to-set-the-minimum-width-of-an-element/5077/2 "2024-07-19T04:02:20Z")

</div>

Hi!  
What a pity that no one has answered so far.

It works the same way it worked in Figma before the introduction of this functionality.  
You need to embed a line of the desired width into the button. Its width + paddings = the minimum width of the button. It works the same for Flex and Grid Layouts.
