Giter Club home page Giter Club logo

vue-name-generator's Introduction

Vue Name Generator

Generates a random name from several list of names provided by the user

Play the demo

To see the demo version:

  • Clone the repository
  • Install NPM
  • Launch the command npm install
  • Launch npm run dev

Install the component

npm install vue-name-generator --save

Use vue-name-generator in your component

<template>
    <div>
        <input type="text" :value="nameGenerated"/>
        <vue-name-generator v-model="nameGenerated" color="grey" width="15px" height="15px" :files='["./assets/adjectives","./assets/names"]' noSpace separator="-" maxLength="50" icon="mdi-autorenew" title="My title"/>
    </div>
</template>

<script>
import vueNameGenerator from "../vue-name-generator.vue";
export default{
    data(){
        return{
            nameGenerated:"no name"
        }
    },
    components: {
        vueNameGenerator
    }
}
</script>
Component properties
  • color: string - (default:grey) color of the icon used to generate the names
  • width: string - (default: 15px) width of the icon
  • height: string - (default:15px) height of the icon
  • files: array - (default: ["./assets/adjectives","./assets/names"]) inputs to generate the name. Each entry provides the relative path to the file. The order define the order in which the parts will be used for names generation. Eg: ["./assets/adjectives","./assets/names"]
  • maxLength: number - (default: 30) maxLength of the string generated
  • noSpace: boolean - (default: true) when true, remove all the spaces from the inputs
  • separator: string - (default: -) separate the entry of each of the input files
  • icon: string - (default: mdi-tag-plus) define the icon used for the generator
  • title: string - (default: Clic to generate a new name) define the title of the span
Contributing

We will consider the MRs, so feel free to send some. We will also be happy to consider your feedbacks and comments.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the BSD3 License - see the LICENSE.md file for details

Acknowledgments

vue-name-generator's People

Contributors

ahermant avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.