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

@opeepsfun/open-peeps

v1.0.6

Published

npm package of open peeps

Downloads

594

Readme

@opeepsfun/open-peeps

npm license

Description

This is an npm package for Open Peeps, a collection of hand-drawn illustrations. You can use Open Peeps in product illustration, marketing imagery, comics, product states, user flows, personas, storyboarding, invitations for your quinceañera...or anything else you want!

Try it

You can test and experience the library by using the official builder. Explore various options, customize characters, and see all the features in action for more details and a hands-on experience with the components.

Installation

To install this package, run the following command:

npm install @opeepsfun/open-peeps

Usage

Here's a simple example to get you started:

import { Effigy } from "@opeepsfun/open-peeps";

const bodyDetails = {
    type: "SomeBodyType",
    options: {
        /*...some options...*/
    }
};

const headDetails = {
    type: "SomeHeadType",
    options: {
        /*...some options...*/
    }
};

const faceDetails = {
    type: "SomeFaceType",
    options: {
        /*...some options...*/
    }
};

<Effigy body={bodyDetails} head={headDetails} face={faceDetails} />;

In this example, type is a string representing the type of piece you want to create (for example, "Explaining" for body type), and options is an object containing key-value pairs that represent the options for that piece. The keys and available options depend on the type of the piece.

Features

  1. Composable:
    • The Effigy component allows you to compose different pieces together to create a character. Each piece is defined by a type and a set of options.
  2. Customizable:
    • Each piece can be customized using the options prop to define different characteristics, styles, or properties depending on the piece type.
  3. Optional Pieces:
    • Pieces like beard, mask, and accessory are optional, allowing for the creation of diverse characters.
  4. Transformations:
    • The Effigy component handles various transformations to position and scale the different pieces together harmoniously. There will be Sitting and Standing components too. Coming soon!
  5. Dynamic Importing:
    • The component dynamically imports the necessary elements based on the type provided, making it versatile and optimized.

Components and Props

Here are the details of the props that the Effigy component accepts:

  • body: Required. Represents the body of the character.
  • head: Required. Represents the head or hair of the character.
  • face: Required. Represents the face of the character.
  • beard: Optional. Represents the beard of the character if any.
  • mask: Optional. Represents the mask of the character if any.
  • accessory: Optional. Represents any accessory of the character if any.
  • style: Optional. Accepts a React.CSSProperties object to apply styles to the SVG element.

Each of the piece props (like body, head, etc.) should be an object containing:

  • type: String. Specifies the type of the piece.
  • options: Object. Specifies additional options and properties for the piece.

Example Types and Options

Here are some example type and options you can use for different pieces:

const bodyDetails = {
    type: "Explaining",
    options: { color: "blue" }
};

const headDetails = {
    type: "Bald",
    options: { color: "brown" }
};

const faceDetails = {
    type: "Smiling",
    options: { eyeColor: "green" }
};

const beardDetails = {
    type: "FullMedium",
    options: { color: "black" }
};

const accessoryDetails = {
    type: "Eyepatch",
    options: { color: "black" }
};

<Effigy body={bodyDetails} head={headDetails} face={faceDetails} beard={beardDetails} accessory={accessoryDetails} />;

These are just example types and options; refer to the component documentation or source code for the full list of available types and options for each piece.

Build

To build the project, run:

npm run build

Contributing

If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

License

MIT

Author