1.0.1 • Published 4 years ago

vue-initials-placeholder v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

vue-initials-placeholder

License: MIT

A vue component that uses parsed initials as placeholders. Can be used as a substitute for absent user profile photo.

preview image

Installation

# yarn
yarn add vue-initials-placeholder

# npm
npm i --save vue-initials-placeholder

Usage

<script>
import VueInitialsPlaceholder from 'vue-initials-placeholder.vue'

export default {
  components: {
    VueInitialsPlaceholder
  }
}
</script>

<template>
  <div>
    <VueInitialsPlaceholder value="Emmanuel Raymond"/>
  </div>
</template>

Props

NameTypeDefaultDescriptionRequired
valueStringnullThe name you want to parse as placeholdertrue
bgColorString#4285F4Background color - color name, rgb or hexfalse
sizeString40The width and height of the container that contains the initials in pxfalse
textColorString#fffText color of the initials - color name, rgb or hexfalse
fontSizeString18Font size of the initials in pxfalse

Acknowledgement

This package was inspired by Initials-placeholder-react

Contributing

If you would like to report bugs or request a feature, please create a new issue.

If you'd like to contribute to the code:

  • Fork it!
  • Create your feature branch: git checkout -b feature-name
  • Commit your changes: git commit -am 'Some commit message'
  • Push to the branch: git push origin feature-name
  • Submit a pull request!

License

This project is released under the terms of the MIT License