Skip to content

Commit ff88e58

Browse files
committed
feat: docs for v-mark
1 parent d85cd98 commit ff88e58

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

guide/animations.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ You can override them to customize the transition effects in your custom stylesh
239239
For example, you can achieve the scaling up transitions by:
240240

241241
```css
242-
// styles.css
242+
/* styles.css */
243243

244244
.slidev-vclick-target {
245245
transition: all 500ms ease;
@@ -267,6 +267,42 @@ To specify animations for only certain slide or layout
267267

268268
Learn more about [customizing styles](/custom/directory-structure#style).
269269

270+
## Rough Markers
271+
272+
> Available since v0.48.0
273+
274+
Slidev integrates [Rough Notation](https://github.com/linkstrifer/react-rough-notation) to allow marking or highlighting elements in your slides.
275+
276+
### `v-mark`
277+
278+
Rough Notation integrates comes with the `v-mark` directive.
279+
280+
#### Type
281+
282+
`v-mark.underline` for Underline mark, `v-mark.circle` for Circle mark, etc. Default to `underline`
283+
284+
#### Color
285+
286+
`v-mark.red` make the notation `red`. Supported builtin color themes from UnoCSS. For custom colors, use object syntax `v-mark="{ color: '#234' }"`
287+
288+
#### Clicks
289+
290+
`v-mark` works like `v-click` and will trigger after a click. Same as `v-click`, it allows you to pass a custom click value, like `v-mark="5"` or `v-mark="'+1'"`.
291+
292+
#### Options
293+
294+
Optionally you can pass an object to `v-mark` to specify the options, for example:
295+
296+
```vue
297+
<span v-mark="{ at: 5, color: '#234', type: 'circle' }">
298+
Important text
299+
</span>
300+
```
301+
302+
#### Preview
303+
304+
<video src="https://github.com/slidevjs/slidev/assets/11247099/c840340c-0aa1-4cde-b228-e6c67e5f6879" rounded-lg shadow controls></video>
305+
270306
## Motion
271307

272308
Slidev has [@vueuse/motion](https://motion.vueuse.org/) built-in. You can use the `v-motion` directive to any elements to make apply motion on them. For example

0 commit comments

Comments
 (0)