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

@nightborn/signum

v1.0.6

Published

A lead-generating communication component

Downloads

7

Readme

Signum

Banner

NPM JavaScript Style Guide

Demo

  • You can try the communication tool here: https://nightborn-be.github.io/signum
  • Or on our website for a production-version: https://nightborn.be

Install

npm install --save @nightborn/signum
yarn add @nightborn/signum

Configuration

Theme

Configurator For the configuration of the UI we created a little interface to generate a config.js file to customize the theme. https://nightborn.be/lab/signum

Options

For the options it's a pretty straightforward structure.

  1. First create the container object:
option: {
    title: 'Hello there !',
    subTitle: 'How can I help you?',
    message: 'How can I help you?',
    name: 'Hello there'
}
  1. Add the array of options (If you want options)
option: {
    title: 'Hello there !',
    subTitle: 'How can I help you?',
    message: 'How can I help you?',
    name: 'Hello there',
    options: [
        {
            title: 'Hello there !',
            message: 'You chose option A?',
            name: 'Option A',
            options: [
                {
                    title: 'Hello there !',
                    message: 'You chose option AA?',
                    name: 'Option AA',
                },
                {
                    title: 'Hello there !',
                    message: 'You chose option AB?',
                    name: 'Option AB',
                }
            ]
        },
        {
            title: 'Hello there !',
            message: 'You chose option B?',
            name: 'Option B',
        }
    ]
}

Important information

  1. In order for the back-button to appear, you should leave blanc the subTitle attribute of the object.
  2. If you're at a leaf of your option-tree, please leave empty the options attribute and the messaging body of Signum will appear.

Usage

import React from 'react'
import Chat from '@nightborn/signum'
import '@nightborn/signum/dist/index.css';

const defaultProps = {
    option: {
        title: 'Hello there !',
        subTitle: 'How can I help you?',
        message: 'How can I help you?',
        name: 'Hello there',
        options: [
            {
                title: 'Hello there !',
                message: 'You chose option A?',
                name: 'Option A',
                options: [
                    {
                        title: 'Hello there !',
                        message: 'You chose option AA?',
                        name: 'Option AA',
                    },
                    {
                        title: 'Hello there !',
                        message: 'You chose option AB?',
                        name: 'Option AB',
                    }
                ]
            },
            {
                title: 'Hello there !',
                message: 'You chose option B?',
                name: 'Option B',
            }
        ]
    },
    config: {
        openByDefault: false,
        avatarIcon: require('./assets/chat_avatar.png'),
        mainColor: 'linear-gradient(90deg, #406321 0%, #283E15 100%)',
        secondaryColor: 'linear-gradient(90deg, #406321 0%, #283E15 100%)',
        sendButtonColor: '#0074CE',
        finalButtonColor: "linear-gradient(90deg, #406321 0%, #283E15 100%)",
        emailPlaceholder: 'Please fill in your e-mail',
        messagePlaceholder: 'Please provide us some information',
        finalTitle: 'Thank you.',
        finalSubTitle: "We'll be in touch!",
        finalButtonText: "Continue",
        handleFinalButtonClicked: () => { },
        handleSendClicked: (information) => console.log(information),
    }
}

const App = () => {
    return (
        <Chat {...defaultProps} />
    )
}

export default App;

Result

In the handleSendClicked function you'll receive following structure

interface IChatBodyInformation {
    email: string,
    message: string,
    steps: IOption[],
    option: IOption
}

You can then use the received information to send it to EMAILJS, your backend, ... any solution in which you want to track the information given by your website visitors.

License

MIT © m-Nightly