Create iOS-style Squircle Elements In React – SquircleJS

Description:

SquircleJS is a lightweight React component to generate responsive, customizable, iOS-style Squircle elements in React apps.

How to use it:

1. Install the SquircleJS with NPM.

# PNPM
$ pnpm add @squircle-js/react

2. Import the Squircle component.

import { Squircle } from "@squircle-js/react"

3. Create a default Squircle element in your app.

const YourComponent = () => {
  return <Squircle>
    Squircle Element
  </Squircle>
}

4. Available component props.

asChild?: boolean;
width: number;
height: number;
cornerRadius: number;
cornerSmoothing: number;

Preview:

Create iOS-style Squircle Elements In React

Add Comment