# An issue with the padding using Plugin API

**URL:** <https://community.penpot.app/t/an-issue-with-the-padding-using-plugin-api/8814>\
**Category:** Help us improve Penpot\
**Tags:** plugins\
**Created:** [May 22, 2025, 2:44pm UTC](https://community.penpot.app/t/an-issue-with-the-padding-using-plugin-api/8814 "2025-05-22T14:44:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![a-ng-d](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/a-ng-d/32/11021_2.png) [@a-ng-d](https://community.penpot.app/u/a-ng-d)\
**Post date:** [May 22, 2025, 2:44pm UTC](https://community.penpot.app/t/an-issue-with-the-padding-using-plugin-api/8814/1 "2025-05-22T14:44:49Z")

</div>

Hi Penpot community,

I’m building a plugin that manages color palette, and I’m struggling with the Boards I generate using the Plugin API.

As you can see in the attachment, the padding left and right is inverted. When clicking the button to show the padding, they are inverted once more, and the issue is resolved.

![Clipboard-20250522-134953-709](https://europe1.discourse-cdn.com/flex017/uploads/penpot/original/2X/b/b0d8fa4b2b620c4c25a4d1c1fb095f91901dc369.gif)

Here is the code snippet I used to configure the padding:

```auto
const flex = tagWithIndicator.addFlexLayout()
flex.dir = 'row'
flex.horizontalSizing = 'fit-content'
flex.verticalSizing = 'fit-content'
flex.columnGap = 4
flex.alignItems = 'center'
flex.rightPadding = 2
flex.leftPadding = 8
flex.verticalPadding = 2

```

The Boards are pretty complex, with a lot of flexible items, depending on the number of color shades.  
I can share my document if you need a deeper investigation.

---

<div class="post-metadata">

**Author:** ![myfunnyandy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/myfunnyandy/32/54_2.png) [@myfunnyandy](https://community.penpot.app/u/myfunnyandy)\
**Post date:** [May 23, 2025, 10:30am UTC](https://community.penpot.app/t/an-issue-with-the-padding-using-plugin-api/8814/2 "2025-05-23T10:30:42Z")

</div>

Good catch! That’s [a bug](https://tree.taiga.io/project/penpot/issue/11152). We’ll probably fix it along with [this other one](https://community.penpot.app/t/an-issue-with-the-stroke-alignment-using-plugin-api/8780).

---

<div class="post-metadata">

**Author:** ![a-ng-d](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/a-ng-d/32/11021_2.png) [@a-ng-d](https://community.penpot.app/u/a-ng-d)\
**Post date:** [May 23, 2025, 12:06pm UTC](https://community.penpot.app/t/an-issue-with-the-padding-using-plugin-api/8814/3 "2025-05-23T12:06:25Z")

</div>

Haha @myfunnyandy,  
For the next time, I will report the bugs on Github 😄

---

<div class="post-metadata">

**Author:** ![myfunnyandy](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/myfunnyandy/32/54_2.png) [@myfunnyandy](https://community.penpot.app/u/myfunnyandy)\
**Post date:** [May 23, 2025, 1:07pm UTC](https://community.penpot.app/t/an-issue-with-the-padding-using-plugin-api/8814/4 "2025-05-23T13:07:09Z")

</div>

yeah, our bug support is definitely better there 🙂
