Skip to content

Vue 3组件,基于 Typed.js 创建打字动画。

License

Notifications You must be signed in to change notification settings

Ten-K/typed-vue3

Repository files navigation

typed-vue3

Vue 3组件,基于 Typed.js 创建打字动画。

NPM version

简体中文 | English

pure-admin-cli

安装

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

使用

<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>

配置

已支持所有 Typed.js 的配置项 具体配置请查看 Typed.js

About

Vue 3组件,基于 Typed.js 创建打字动画。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published