react-smooth-corners icon indicating copy to clipboard operation
react-smooth-corners copied to clipboard

Dynamic values for corners to respect the same ratio

Open giacomoalonzi opened this issue 1 year ago • 1 comments

Hello, thank you for this wonderful tool. I wanted to know if there is a way to have dynamic angles relative to the width of an element. For example, I have elements with the same height but dynamic width, and I would like to always maintain the same angle ratio. Can you help me with this? Thank you.

giacomoalonzi avatar Apr 18 '23 13:04 giacomoalonzi

Hi @giacomoalonzi !

What's this width based on? If it's maybe calculated based on the decide width, then that's how you could compute the property and pass it as a value for the SmoothCorners component?

I think if you posted a codepen example we could brainstorm something 🤔

DJanoskova avatar Apr 18 '23 14:04 DJanoskova