Vue Single File Component to animate text in different decoding styles

Vue Single File Component to animate text in different decoding styles

vue-hacker-text .Vue Single File Component to animate text in different decoding styles .

vue-hacker-text

Vue Single File Component to animate text in different decoding styles.

example

Installation (NPM)

npm install --save vue-hacker-text

Basic Usage

<template> 
    <vue-hacker-text text="Hacker Text"/>
<template>

<script>
    import Vue from 'vue';
    import VueHackerText from 'vue-hacker-text';

    export default Vue.extend({
        components: {
            VueHackerText
        },
    });
</script>

where text is the string you wish to finish decoding to.

Props

Prop Type Values Default Description
text String - - Required
mode String hacker, type, stars hacker Choose decoding style
speed String slow, medium, fast medium The speed at which a character changes. slow = 50ms, medium = 25ms, fast = 5ms
probability Number 0.005 - 1.0 0.01 The probability of selecting the correct character.
typeCharacter String - ` `

Changing the probability can fine tune the speed of which the decoding finishes. Selecting fast speed with a high probability will result in an extremely fast decode. Selecting slow speed with a low probability will result in a very slow decode.

The character set used for decoding is 95 characters. So selecting a probability of less than 5% (0.005) does not make sense as it'll be more likely to choose the correct character randomly.

Events

Event Description
@decodeStart Event emitted before decoding starts
@decodeFinish Event emitted once decoding has completed

Examples

<vue-hacker-text text="Hacker Text" :probability="0.35" speed="slow"/>

<vue-hacker-text text="Hacker Text" mode="stars" speed="fast"/>

<vue-hacker-text text="Hacker Text" mode="type" typeCharacter="#" :probability="0.35" speed="slow"/>

<vue-hacker-text text="Hacker Text" @decodeStart="startFunction" @decodeFinish="finishFunction"/>

Styling

Wrap the component in a styled div. The component is a simple span so it will inherit any styling from its parent div.

<div class="hacker-text">
    <vue-hacker-text text="Hacker Text"/>
</div>

<style>
    .hacker-text {
        font-weight: 600;
        font-size: 2em;
        color: blue;
    }
</style>

Download Details:

Author: simple-hacker

Source Code: https://github.com/simple-hacker/vue-hacker-text

vuejs vue javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

8 Popular Websites That Use The Vue.JS Framework

In this article, we are going to list out the most popular websites using Vue JS as their frontend framework. Vue JS is one of those elite progressive JavaScript frameworks that has huge demand in the web development industry. Many popular websites are developed using Vue in their frontend development because of its imperative features.

Vue Native is a framework to build cross platform native mobile apps using JavaScript

Vue Native is a framework to build cross platform native mobile apps using JavaScript. It is a wrapper around the APIs of React Native. So, with Vue Native, you can do everything that you can do with React Native. With Vue Native, you get

How to Make a Simple Vue Custom Select Component

In this article, you’ll learn how to build a Vue custom select component that can be easily be styled using your own CSS. In fact, it’s the same component that we use in production on Qvault, and you can see it in action on the playground.

Creating a Custom Tooltip Component in Vue

There are plenty of libraries out there that will have you up and running with a good tooltip solution in minutes. However, if you are like me, you are sick and tired of giant dependency trees that have the distinct possibility of breaking at any time.

Vue ShortKey plugin for Vue.js

Vue-ShortKey - The ultimate shortcut plugin to improve the UX .Vue-ShortKey - plugin for VueJS 2.x accepts shortcuts globaly and in a single listener.