• Stars
    star
    175
  • Rank 218,059 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐡 Vue Animated typing in ~400 bytes of JavaScript

English | 简体中文

Vue Typical

Vue Animated typing in ~400 bytes 🐡 of JavaScript. Preview →

npm npm license vitepress jsdelivr

Live Demo https://vue-typical.vercel.app

📦 Installation

Install with yarn

yarn add vue-typical

Or you can

npm install vue-typical

Or inject the script at your page by jsdelivr CDN

<script src="https://cdn.jsdelivr.net/npm/vue-typical@latest/dist/vue-typical.umd.js"></script>

💡 This library Just support Vue 3 now

If you are Vue 2, please see the branch v1 and install [email protected]

🚀 Usage

1. Component

You can import it as a custom component.

<template>
  <v-typical
    class="blink"
    :steps="['Hello', 1000, 'Hello World !', 500, 'Hello World ! 👋', 1000]"
    :loop="Infinity"
    :wrapper="'h2'"
  ></v-typical>
</template>

<script lang="ts">
import VTypical from 'vue-typical';

export default {
  components: {
    VTypical,
  },
};
</script>

2. Plugin API

If you want to configure default options, you can register this plugin through the use API of Vue.js.

// main.js or index.js
import VTypical from 'vue-typical';

Vue.use(VTypical, {
  /* options */
});

If you use the plugin API, the VTypical component will be registered as a global component just like when including it with the script tag, but you won't need to re-register it through the components property in your own components.

3. Composition API

You can also create typical animation by the composition API useTypical.

const ref = useTypical(options);

Coming Soon ...

📑 Properties

Prop Required Type Eg.
steps True Array<String | Number | Function> ['Hello', 1000, () => alert('Word')]
loop False Number 1 or 'Infinity'
wrapper False String 'div'

Style

Add the blink cursor effect with blink classname.

.blink::after {
  content: '|';
  animation: blink 1s infinite step-start;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

🔢 Coming Soon

  • The demo of composition API in Vue 3.0
  • Supported Vue 2 & 3

🔨 Contribute

Install dependencies,

$ npm i

Start the dev server,

$ npm start

Build documentation,

$ npm run docs:build

Build library via father-build,

$ npm run build

❤️ Contributors

Thanks goes to these people:

Contributors

Please Feel free to enjoy and participate in open source!

Stargazers

Thanks for your star!

Stargazers repo roster for @Turkyden/vue-typical

🔖 License

This library is based on @camwiegert/typical work and it currently is just a wrapper for vue.

Inspired by @catalinmiron/react-typical.

MIT © Turkyden

More Repositories

1

lizhi

🎸 李志 (B 仔) 音乐作品跨平台播放器,支持 Web / Mac / Windows / Linux
TypeScript
868
star
2

react-darkreader

🌓 A React Hook for adding a dark / night mode to your site.
TypeScript
281
star
3

watermark-pro

💦 保护你的敏感信息,一款所见即所得的证件加水印工具
TypeScript
147
star
4

image-hover

💄 No Javascript, image hover effects you've always wanted
Vue
50
star
5

geek-resume

💼 纯 Markdown,一套专为开发者量身定制的优雅简历模板
TypeScript
29
star
6

wechat-link

🥕 微信公众号无法外链怎么办?一行代码搞定长按识别二维码。
TypeScript
20
star
7

dengju-gpt

A ChatGPT APP < 100 lines of code
HTML
9
star
8

awesome-fe-teams

☎️ 中国前端梦之队,厂牌黄页龙虎榜
TypeScript
8
star
9

guitarhub

Programmer's favorite Chinese music score resource sharing platform.
HTML
6
star
10

strapi-provider-upload-tencent

Tencent Cloud COS provider for strapi upload
JavaScript
5
star
11

lowcode-weekly

低代码周刊,分享国内外低代码(LCAP)领域的一些见闻,技术难点,行业研究报告。
4
star
12

handsome-elements

💠 A portal elements for application dashboad. 企业级中后台物料库
TypeScript
3
star
13

wx-xxw

我的第一个微信全栈小程序,Egg.js+RestfulApi+WX+Mysql
JavaScript
3
star
14

electron-boilerplate

A boilerplate of fullstack electron application width Nodejs+React+ Typescript.
TypeScript
3
star
15

bit-coin

A chart of bit coin 10 years.
JavaScript
2
star
16

baby-pet

A plateform designed for the information publish about pet service.
TypeScript
2
star
17

digital-go

☄️ A WYSIWYG editor for digital big screen kanban solution.
TypeScript
2
star
18

use-vuejs

🥑 A React Hook similar to the Vuejs API.
TypeScript
1
star
19

icon-c4d

An icon with c4d style deved by react.
TypeScript
1
star
20

awesome-ot

About the operational transformation core tech.
1
star
21

tailwindcss-china

国内最活跃的,资源最丰富的 TailwindCSS 开发者社区
TypeScript
1
star
22

wudao-design

Vue
1
star
23

xrstudio

No Code, WYSIWYG, Web AR, Create your own augmented reality content without code.
TypeScript
1
star
24

awesome-xr

😎 国内元宇宙 AR/VR 开发者黄页
1
star
25

koutu

Remove Background WebGPU. In-browser background removal, powered by 🤗 Transformers.js
JavaScript
1
star
26

ComfyUI-China

a china park for comfyui
HTML
1
star
27

react-typing-hook

Animated typing in ~400 bytes 🐡 of React Hook.
TypeScript
1
star
28

react-icon-dance

A icon dance style cpmponent deved with react.
TypeScript
1
star
29

ComfyUI-Comic

a comfyui plugin for image to comic
Python
1
star
30

use-typical

Animated typing in ~2.6 kb 🐡 with React Hook.
TypeScript
1
star
31

react-slide-pane

Slide-Pane React component, can be splited vertically or horizontally to the difference between two images!
TypeScript
1
star
32

buddha-gpt

TypeScript
1
star