Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 1.35 KB

README.en-US.md

File metadata and controls

61 lines (48 loc) · 1.35 KB

typed-vue3

A Vue 3 component for creating typing animations using Typed.js.

NPM version

简体中文 | English

pure-admin-cli

Installation

# npm
npm install typed-vue3
# pnpm
pnpm add typed-vue3
# npm
yarn add typed-vue3

Usage

<template>
  <TypedComponent :options="options" />
</template>

<script setup lang="ts">
import { TypedComponent, type TypedOptions } from "typed-vue3";

const options: TypedOptions = {
  strings: ["云想衣裳花想容", "春风拂槛露华浓"]
};
</script>
<template>
  <TypedComponent :options="options">
    <span>李白白:</span><span class="typing" />
  </TypedComponent>
</template>

<script setup lang="ts">
import { TypedComponent, type TypedOptions } from "typed-vue3";

const options: TypedOptions = {
  strings: ["云想衣裳花想容,春风拂槛露华浓"],
  typeSpeed: 50,
  loop: true,
  onComplete(self) {
    console.log("onComplete", self);
  }
};
</script>

options

For details, please view Typed.js