Socket
Socket
Sign inDemoInstall

vue-login-critter

Package Overview
Dependencies
11
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-login-critter

Animated character that responds to login form interactions


Version published
Maintainers
1
Created

Readme

Source

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! 🙏🏼

Buy Me A Coffee

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

NameTypeRequiredDefaultDescription
background-colorStringNo"#3DCEBA"Background color of login form, any valid css colour value
text-colorStringNo"#2c3e50"color of text in form, any valid css colour value
neutral-imageStringNo"./assets/neutral.png"Chracter neutral state, displayed on load when form is empty
active-imageStringNo"./assets/active.png"Character active state, displayed when username input is focused
shy-imageStringNo"#./assets/shy.png"Character shy state, displayed when password field is focused
peek-imageStringNo"#./assets/peek.png"Character peek state, displayed when user toggles show password
success-imageStringNo"./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 nameDescription
footerAllows overriding default submit button

Events

EventDescription
submit-formEmitted 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
}

FAQs

Last updated on 21 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc