Figma Squircle Rust
Figma-flavored squircles for everyone
Disclaimer
This library is not an official product from the Figma team and does not guarantee to produce the same results as you would get in Figma.
This is a rust fork of phamfoo/figma-squircle - Big thanks to the original creator.
What is this?
Figma has a great feature called corner smoothing, allowing you to create rounded shapes with a seamless continuous curve (squircles).

This library helps you bring those squircles to your apps.
Installation
Usage
use ;
Preserve Smoothing
The larger the corner radius, the less space we have left to make a smooth transition from the straight line to the rounded corner. As a result, you might have noticed that the smoothing effect appears to be less pronounced as the radius gets bigger.
Try enabling preserve_smoothing if you're not happy with the generated shape.
let svg_path = get_svg_path;
There's also a Figma plugin that utilizes this option.
Thanks
- Figma team for publishing this article and MartinRGB for figuring out all the math behind it.
- phamfoo for creating figma-squircle, which this project was forked from.