npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@luanedcosta/vue-profile-picture

v0.3.2

Published

Lightweight vue component to render the user picture or his name initials.

Downloads

4

Readme

Vue Profile Picture

Lightweight vue component to render the user picture or his name initials It's easy to customize with your style and change the behavior using the properties of the component.

Instalation

To install the package in your project you can type:

Once installed you can use the component as a plugin:

There's no options, so you can ignore the second parameter of Vue.use()

import VueProfilePicture from '@luanedcosta/vue-profile-picture'

Vue.use(VueProfilePicture)

Or you can import the component locally:

import { VueProfilePicture } from '@luanedcosta/vue-profile-picture'

export default {
    components: { VueProfilePicture }
}

Simple Usage

If exists an image the component will render a <img> tag. If the user doesn't have an image his initials will appear in place of the image.

<vue-profile-picture name="Username" img="Image src"/>

Props

The table below contains all component props.

Property | Type | Default | Required | Explanation ------------ | ------------ | ------------ | ------------ | ------------ name | String | | true | Name of the user classes | String | null | false | HTML class property for the <img> tag or <div> with the initials styles | Object | null | false | HTML style property for the <img> tag or <div> with the initials noStyle | Boolean | false | false | Remove all default component classes to allow you to define your own css classes numOfInitials | Number | 2 | false | Number of letters that will appear with the user doesn't have image nameSeparator | String | white space | false | Character or string that separates each user name transform | Number | 1 | false | 1 = Initials uppercase; 2 = Initials lowercase; 0 = Don't transform the text firstName | Boolean | false | false | The component will show only the firstname initials lastName | Boolean | false | false | The component will show only the lastname initials def | String | '-' | false | If the component didn't find an image neither the user name the component will display this property value on screen img | String | null | false | The src for the image. The same as the src property of the <img> tag alt | String | null | false | The same as alt property of the <img> tag draggable | String | "true" | false | If true the image can be draggable