1.2.1 • Published 1 year ago

vuejs-typing v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Installation Guide

This guide will help you install and use the directive in your Vue.js project.

Prerequisites

Ensure you have the following installed on your system:

  • Node.js and npm
  • Vue.js/Nuxt

Installation

  1. Install the package

    Open your terminal and run the following command:

    npm install vuejs-typing

Usage

You can use the directive either globally in your Vue application or locally in a single Vue component.

  1. Global import

    Import the directive and use it in your Vue application:

    import { createApp } from 'vue'
    import App from './App.vue'
    import typing from 'vuejs-typing'
    
    const app = createApp(App)
    
    app.use(typing)
  2. Local import

    Import the directive and use it in your Vue component:

    import { typing } from 'vuejs-typing'
    
    export default {
      directives: {
        typing
      }
    }

Use the directive

You can now use the directive in your Vue template:

<div v-typing="'Hello World'"></div>

Or with an object configuration:

<div v-typing="{ text: 'Hello World', typeSpeed: 100, hasCaret: true, caretSymbol: '|', wordSplit: false }"></div>

Configuration

PropertyTypeDefaultDescription
textstring''The text to be typed out.
typeSpeednumber100The speed at which the text is typed out. (ms)
hasCaretbooleantrueWhether to display a caret at the end of the typing.
caretSymbolstring'I'The symbol to use for the caret.
wordSplitbooleanfalseWhether to split the text into words. If true, each word is typed out separately.
caretobjectnullThe caret object. This is managed internally and should not be set manually.
onStartfunctionnullA function to be called when the typing starts.
onEndfunctionnullA function to be called when the typing ends.
1.2.1

1 year ago

1.2.0

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.2

3 years ago

0.0.1

3 years ago