@taep96/squircle-path
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

squircle-path

Generate squircle paths

Installation

bun install @taep96/squircle-path

Usage

import { squirclePath } from "@taep96/squircle-path";

const squircle = squirclePath({ width: 256, height: 256, squarness: 0.5 });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

<img
  style={{ "clip-path": `path("${squircle}")` }}
  src="./image.png"
  alt="squircle"
  width="256"
  height="256"
/>

Options

Name Type Default Description
width number Width of the squircle
height number Height of the squircle
squarness number? 0.3 Squarness of the squircle. 0 is a circle, 1 is a square, 0.5 is a perfect squircle

Package Sidebar

Install

npm i @taep96/squircle-path

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.73 kB

Total Files

5

Last publish

Collaborators

  • taep96