open-index/open-npm huggingface dataset:
npm package: @gwenjo/slidev-addon-typewriter
Description: A typewriter text animation addon for Slidev
Latest version: 1.0.0

# Slidev Typewriter Addon

A typewriter text animation addon for [Slidev](https://github.com/slidevjs/slidev).

## Installation

```bash
npm install slidev-addon-typewriter
# or
yarn add slidev-addon-typewriter
# or
pnpm add slidev-addon-typewriter
```

Add the addon to your `slides.md`:

```yaml
---
addons:
  - slidev-addon-typewriter
---
```

## Usage

### As a Directive

```html
<!-- Basic usage -->
<h1 v-typewriter>This text will type out</h1>

<!-- With custom duration -->
<p v-typewriter="{ duration: 1.5 }">Types out in 1.5 seconds</p>
```

### As a Component

```html
<!-- Basic usage -->
<TypewriterText>This text will type out</TypewriterText>

<!-- With custom duration -->
<TypewriterText :duration="1.5">Types out in 1.5 seconds</TypewriterText>
```

## Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| duration | number | 2 | Animation duration in seconds |

## License

MIT License © 2024