Have ideas to improve npm?Join in the discussion! »

    text-scrambler

    0.0.6 • Public • Published

    text-scrambler

    A text scrambler/shuffler Vue component

    Installation

    npm install text-scrambler

    Usage

    import TextScrambler from 'text-scrambler';
    
    let text = "Hello";
    
    <TextScrambler :text="text"/>
    
    setTimeout(() => text = "There!", 2000)
    

    As soon as the text variable changes, the component will animate the previous text to the new text while adding a text scramble effect.

    The text scrambling logic has been yanked from this pen https://codepen.io/soulwire/pen/mErPAK by Justin Wendle (https://codepen.io/soulwire/)

    Props

    props: {
            text: String,
            disableInitialScramble: Boolean,
            scrambleDuration: {
                type: Number,
                default: 20
            },
            scrambleCharacterSet: {
                type: String,
                default: '!<>-_\\/[]{}—=+*^?#________'
            }
        }
    

    Install

    npm i text-scrambler

    DownloadsWeekly Downloads

    15

    Version

    0.0.6

    License

    MIT

    Unpacked Size

    1.27 MB

    Total Files

    66

    Last publish

    Collaborators

    • avatar