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

vue-login-critter

v0.1.3

Published

Animated character that responds to login form interactions

Downloads

2

Readme

Vue Login Critter

An attempt to build a customisable login form with an animated character based on https://github.com/cgoldsby/LoginCritter.

The goal is to build a login form component which allows:

  • Drop in of different characters or avatars, supporting rich animations and interactivity
  • Customisation of colours, form inputs and button
  • TBC

If you like or use this project, please consider supporting my work. Thanks! 🙏🏼

Todo list

This project is in early stages of development, so expect bugs and breaking changes. If you give it a go, please let me know your thoughts!

  • Rich animated interactive character responses as user types username and password.

    To allow for rich character animations and interactivity, I think supporting Lottie is the way forward here.

  • Additional customisation options such as form inputs, colours, labels.

  • ~~Customise background color~~

  • ~~Submit button is a slot which can be replaced~~

  • ~~Character states represented by images (neutral, active, shy, peek and success)~~

Install

npm install vue-login-critter --save

Usage

In main.js in your Vue project

import Vue from 'vue'
import LoginCritter from 'vue-login-critter'

Vue.use(LoginCritter)

And then, in your template

<login-critter
  background-color="#fff"
  text-color="#333"
  :neutral-image="require('path/to/neutralimage.png')"
  :active-image="require('path/to/activeimage.png')"
  :shy-image="require('path/to/shyimage.png')"
  :peek-image="require('path/to/peekimage.png')"
  :success-image="require('path/to/successimage.png')"
>
  <template v-slot:footer>
    <button type="submit">My button label</button>
  </template>
</login-critter>

See documentation about props, slots and events below.

Props

| Name | Type | Required | Default |Description | | -- | -- | -- | -- | -- | | background-color | String | No | "#3DCEBA" | Background color of login form, any valid css colour value | | text-color | String | No | "#2c3e50" | color of text in form, any valid css colour value | | neutral-image | String | No | "./assets/neutral.png" | Chracter neutral state, displayed on load when form is empty | | active-image | String | No | "./assets/active.png" | Character active state, displayed when username input is focused | | shy-image | String | No | "#./assets/shy.png" | Character shy state, displayed when password field is focused | | peek-image | String | No | "#./assets/peek.png" | Character peek state, displayed when user toggles show password | | success-image | String | No | "./assets/ecstatic.png" | Character success state, displayed when submit button is pressed |

Thanks to https://github.com/cgoldsby/LoginCritter for the default character assets.

Slots

| Slot name | Description | | -- | -- | | footer | Allows overriding default submit button |

Events

| Event | Description | | -- | -- | | submit-form | Emitted when form is submitted, contains username and password as the first and second positional arguments respectively |

<login-critter
  // ...props
  @submit-form="loginUser"
>
</login-critter>

// and in your methods
loginUser(username, password) {
  // do something here
}