While often used interchangeably in design, different 'squircle' shapes—such as those used by Apple and Figma—rely on distinct mathematical foundations that impact visual smoothness and geometric behavior. These shapes range from pure analytic curves like the superellipse to hybrid 'flat-sided' models that combine straight lines with curved corners.

The Superellipse and the Concept of Gauge

The superellipse is the most prominent mathematical model for a squircle. Defined by the formula |x|^n + |y|^n = 1, the shape's appearance is governed by the exponent n. When n=2, the result is a perfect circle; as n increases, the shape pushes outward toward a square.

To compare different squircle variants, designers use a 'gauge' measurement. For a unit radius, the gauge is the x-coordinate of the quadrant's midpoint, calculated as x = 0.5^(1/n). This allows for a standardized way to measure how 'square' a specific squircle appears relative to its radius.

“A squircle is a shape intermediate between a square and a circle. There is no single mathematical definition, rather there are a number of curves that fit this shape.”

— Squircles

Design Variations: Apple vs. Figma

Apple's famous iOS 7 squircle is not a pure superellipse but a flat-sided squircle. This construction mixes straight line segments with corners, a method that allows the shape to adapt to rectangles of various aspect ratios without distorting the corner geometry.

A comparison showing the Apple squircle shape next to a superellipse with an exponent of 3.
Comparison of the Apple-style flat-sided squircle against a mathematical superellipse.linebender.org

This figure illustrates the visual difference between the flat-sided squircle used by Apple and the pure superellipse model.

In contrast, Figma's squircle is a three-segment Bézier approximation. While it fixes some of the symmetry flaws found in Apple's design, it creates a curvature discontinuity where the segments join the circular arc. Unlike the clothoid squircle, which maintains G2 continuity (smooth curvature transitions), the Figma version is a manual approximation of a smooth profile.

Squircle Gauge Comparison (No Flat Side): Superellipse (n=2) 0.707; Figma Squircle 0.707; Clothoid Squircle 0.790
Squircle Gauge Comparison (No Flat Side)linebender.org

Chart drawn by HN Digest from figures reported by linebender.org; values are shown as written in the source.

Standardization and Browser Implementation

The 'corner-shape' property in the CSS box decorations spec has standardized the use of superellipse corners. This allows developers to specify real superellipse shapes with support for animation, moving beyond simple rounded rectangles.

A screenshot of a code listing demonstrating the corner-shape specification.
Code implementation for the CSS corner-shape property.linebender.org

This screenshot shows the technical implementation of the corner-shape specification mentioned in the text.

Because rendering a true superellipse can be computationally intensive, browsers like Chromium use a closed-form Bézier approximation. This formula, derived via symbolic regression, uses two Bézier segments per quadrant to provide an efficient approximation that remains accurate at the midpoint for exponents of 2 and above.

What Hacker News readers are saying

  • Technical note: One commenter explained that the sides of a squircle are curved at every point rather than being completely straight, which they noted allows the shapes to scale more effectively for nesting. comment ↗
  • Technical note: A reader clarified the data visualization in the article by noting that the horizontal axis represents arc length while the vertical axis represents curvature. comment ↗
  • Experience: One commenter shared their experience using a specific software license to create various UI elements, noting it was a tool they had used in the past. comment ↗
  • Skeptical: Another user expressed frustration regarding the limited availability of squircle corner shapes as a CSS feature, noting they are currently only available in certain browsers. comment ↗

Summarized opinions from the Hacker News thread, not verified facts. Read the full discussion ↗