Skip to content

Commit 7b09523

Browse files
committed
Update README.md
1 parent 834fce2 commit 7b09523

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm install slidev-addon-fancy-arrow
1414

1515
## Slidev configuration
1616

17-
```
17+
```yml
1818
---
1919
addons:
2020
- fancy-arrow
@@ -24,3 +24,38 @@ addons:
2424
## Usage
2525

2626
[👉 Check out the demo and docs](https://whitphx.github.io/slidev-addon-fancy-arrow/).
27+
28+
### Basic Examples
29+
30+
#### Absolute positions
31+
32+
```html
33+
<FancyArrow from="(10, 20)" to="(30, 40)" />
34+
```
35+
36+
#### Snapped to elements
37+
38+
```html
39+
<div data-id="anchor1" m-8>anchor1</div>
40+
<div data-id="anchor2" m-8>anchor2</div>
41+
<FancyArrow from="[data-id=anchor1]" to="[data-id=anchor2]" />
42+
<FancyArrow from="[data-id=anchor1]@bottom" to="[data-id=anchor2]@top" />
43+
```
44+
45+
#### Configure the styles
46+
47+
```html
48+
<FancyArrow
49+
color="orange"
50+
width="4"
51+
two-way
52+
head-type="polygon"
53+
head-size="40"
54+
roughness="2"
55+
bowing="0.5"
56+
seed="42"
57+
arc="0.5"
58+
from="(100, 200)"
59+
to="(300, 400)"
60+
/>
61+
```

0 commit comments

Comments
 (0)