Skip to content

Commit 857fc20

Browse files
committed
Update README
1 parent 1dbe1b5 commit 857fc20

File tree

1 file changed

+13
-38
lines changed

1 file changed

+13
-38
lines changed

README.md

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ This library helps you bring those squircles to your apps.
1818

1919
## Installation
2020

21-
```sh
22-
yarn add figma-squircle
23-
```
24-
25-
or
26-
2721
```sh
2822
npm install figma-squircle
2923
```
@@ -74,41 +68,22 @@ function ProfilePicture() {
7468
}
7569
```
7670

77-
## Squircle Params
78-
79-
### width
80-
81-
> `number` | **Required**
82-
83-
### height
84-
85-
> `number` | **Required**
86-
87-
### cornerSmoothing
88-
89-
> `number` | **Required**
90-
91-
Goes from 0 to 1, controls how smooth the corners should be.
92-
93-
### cornerRadius
94-
95-
> `number` | defaults to `0`
71+
## Preserve Smoothing
9672

97-
### topLeftCornerRadius
73+
This option allows corner smoothing to work better on large rounded corners.
9874

99-
> `number`
100-
101-
### topRightCornerRadius
102-
103-
> `number`
104-
105-
### bottomRightCornerRadius
106-
107-
> `number`
108-
109-
### bottomLeftCornerRadius
75+
```jsx
76+
const svgPath = getSvgPath({
77+
width: 200,
78+
height: 200,
79+
cornerRadius: 80,
80+
cornerSmoothing: 0.8,
81+
// This is false by default
82+
preserveSmoothing: true,
83+
})
84+
```
11085

111-
> `number`
86+
There's also a [Figma plugin](https://www.figma.com/community/plugin/1122437229616103296) you can install that utilizes this option.
11287

11388
## Thanks
11489

0 commit comments

Comments
 (0)