Skip to content

feat: extend roundedRect to allow you to select which corners are rounded#1698

Open
tr1stan wants to merge 4 commits intofoliojs:masterfrom
tr1stan:extend-roundedRect-to-allow-corner-pick
Open

feat: extend roundedRect to allow you to select which corners are rounded#1698
tr1stan wants to merge 4 commits intofoliojs:masterfrom
tr1stan:extend-roundedRect-to-allow-corner-pick

Conversation

@tr1stan
Copy link

@tr1stan tr1stan commented Mar 10, 2026

This is a new feature that allows you to configure which corner of a rounded corner, the sepcified raidus applies to.

Checklist:

  • Unit Tests
  • Documentation
  • Update CHANGELOG.md
  • Ready to be merged

@tr1stan tr1stan changed the title feat: add a new param to roundedRect to allow you to select which corners are rounded feat: extend roundedRect to allow you to select which corners are rounded Mar 11, 2026
* `polygon(points...)`

`roundedRect` `cornerRadius` param accepts a single radius (number) or per-corner radii (array).
If an array, the order is: `[topRight, bottomRight, bottomLeft, topLeft]`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you adjust the order to match the css?

/* top-left | top-right | bottom-right | bottom-left */

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/border-radius

Also please rename cornerRadius to borderRadius

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants