Create iOS App Like Corners In React

Description:

A React component that helps developers create iOS app style rounded corners (squircle) using CSS border-radius property.

How to use it:

1. Install and import the component.

# Yarn
$ yarn add react-ios-corners
# NPM
$ npm i react-ios-corners --save
import { Squircle } from 'react-ios-corners';

2. Basic usage:

function MyComponent() {
  return <Squircle>Hello</Squircle>;
}

3. Change the radius and roundness of the rounder borders.

export interface SquircleProps {
  className?: string;
  radius?: number | 'auto';
  roundness?: number;
}

Preview:

Create iOS App Like Corners In React

Add Comment