Skip to content

Commit 9c72799

Browse files
committed
feat: enhanced v-click usage
1 parent 62344a8 commit 9c72799

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

guide/animations.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,35 @@ When you click the "next" button, both `Hello` and `World` will show up together
5252

5353
An item will become visible accordingly whenever you click "next".
5454

55+
### Custom Clicks Count
56+
57+
By default, Slidev can smartly count how many steps are needed before going next slide. And you can override it by passing the `clicks` frontmatter option:
58+
59+
```yaml
60+
---
61+
# 10 clicks in this slide, before going to the next
62+
clicks: 10
63+
---
64+
```
65+
66+
### Ordering
67+
68+
By passing the click index to your directives, you can customize the order of the revealing
69+
70+
```md
71+
<!-- "1" go first -->
72+
<div v-click>1</div>
73+
<div v-click>2</div>
74+
<div v-click>3</div>
75+
```
76+
77+
```md
78+
<!-- "3" go first, then "2" -->
79+
<div v-click="3">1</div>
80+
<div v-click="2">2</div>
81+
<div v-click="1">3</div>
82+
```
83+
5584
## Transitions
5685

5786
The built-in support for slides and elements transitions is NOT provided in the current version. We are planned add it in the next major version. Before that, you can still use your custom styles and libraries to do that.

0 commit comments

Comments
 (0)