@klinking/squircle

We all love the squircle! It's great, we can use it to make corners feel extra smooth. Gives that little bit of zhuzh. Others can tell you all about the math and why we love it. And now we can use them in CSS! There's just one problem... for the same border-radius, the squircle will look less rounded than the circle. That's where this package comes in.

StyleX

Squircle utilities authored as StyleX dynamic styles. Each variant is a function that takes a radius (and an optional superellipse amt) and produces a borderRadius + cornerShape pair gated behind @supports (corner-shape: superellipse(2)).

Edit on StackBlitz

Powered by StackBlitz. Requires a Chromium-based browser.