tarun.codes

smooth-squircle

2026

iOS style squircle corners for React, with a smart fallback for browsers that cannot draw them. About 1.5KB gzipped.

View Live Site

Client

Open source

Role

Author

Service

React · TypeScript · SVG · npm

smooth-squircle cover

Work Details

The brief

CSS border-radius draws circular corners. Apple's app icons and cards use smoother squircle curves, and designers kept asking for that look on product cards and buttons. The existing libraries broke on mobile WebViews and older Safari, which is exactly where a lot of shoppers are.

The build

smooth-squircle uses Apple's bezier control points to draw a real squircle path, and falls back to a normal border-radius when the browser cannot render it. It supports different radii for mobile and desktop, and borders that follow the curve exactly. Fully typed in TypeScript and tree-shakeable.

smooth-squircle detail 1
smooth-squircle detail 2

The result

The core is about 1.5KB gzipped and published on npm under the MIT license. My older portfolio used it for every card.

smooth-squircle solution