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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@unicorns/sign-me-up

v1.3.0

Published

Vue component for dynamic signups

Readme

About this package

This is a vue2 generic and dynamic signup package.

Compatible with UnicornGlobal/quick-dash-framework.

Designed to work with a UnicornGlobal/strong-lumen based backend.

Installation

npm install @unicorns/sign-me-up --save

Usage

// In your vue component
<template>
    <div>
        <sign-me-up :options="signupOptions"></sign-me-up>
    </div>
</template>
<script>
    import SignMeUp from '@unicorns/sign-me-up'

    export default {
        components: {
          SignMeUp
        },
        data(){
            return {
                signupOptions: {
                    title: 'Sign Up',
                    registrationUrl: 'https://api.example.com/register',
                    registrationAccessKey: 'some-key',
                    debugToken: 'some-debug-token',
                    loginUrl: 'https://dashboard.example.com/login',
                    pages: [
                        {
                          name: 'personal',
                          tag: 'personal',
                          fields: [
                            {
                              id: 'firstName',
                              label: 'First Name',
                              type: 'text',
                              disabled: false,
                              required: true
                            },
                            {
                              id: 'lastName',
                              label: 'Last Name',
                              type: 'text',
                              disabled: false,
                              required: true
                            },
                            {
                              id: 'email',
                              label: 'Email',
                              type: 'email',
                              disabled: false,
                              required: true
                            },
                            {
                              id: 'mobile',
                              label: 'Mobile',
                              type: 'phone',
                              disabled: false,
                              required: true
                            },
                            {
                              id: 'password',
                              label: 'Password',
                              type: 'password',
                              disabled: false,
                              required: true,
                              confirm: true
                            }
                          ]
                        }
                    ]
                }
            }
        }
    }
</script>

Setup

The component accepts only one prop, options - A configuration object for the dynamic signup process

Basic Theme Support

You can set a basic theme on the signups

It uses CSS modules and variables and a little bit of upfront processing to override the included defaults.

To pass in the theme you now need to Vue.use(SignMeUp)

You can also add custom assets for dropdowns, checkboxes, etc.

Example
// In the host application
import SignMeUp from '@unicorns/sign-me-up'

// This example will override these theme variables.
Vue.use(SignMeUp), {
  theme: {
    primary: '#DAB',
    secondary: '#343',
    padding: '1em'
  },
  // you can also add custom assets
  assets: {
    dropdown: 'url(data:image/svg+xml;utf8,<svg><path stroke="#000" d="m2,2 15,15m0-15-15,15"/></svg>)'
  }
})

Special Fields

There are some special field types that add enhanced inputs

Phone Number

Phone number inputs includes a dropdown with flags.

Example

{
  id: 'phone',
  label: 'phone',
  type: 'phone',
  disabled: false,
  required: true,
  autocomplete: 'tel-country-code',
  placeholder: '+27 82 222 2222',
  preferredCountries: ['US'],
  disableFetchingCountries: true,
  name: 'mobile'
}
Google Places Autocomplete

Autocomplete using Google places

{
  id: 'city',
  label: 'City',
  type: 'google-places',
  googlePlacesKey: 'add-your-api-key-here'
  disabled: false,
  required: true,
  autocomplete: 'address-level1',
  name: 'location'
}

Host App Requirements

You must supply a registrationAccessKey and a debugToken in the options prop.

See UnicornGlobal/strong-lumen for details on this.

If your backend does not use these headers then feel free to open a PR to make them optional instead of a hard requirement.