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

neko-chan-ui

v1.2.0

Published

![Neko Chan UI Logo](/src/assets/Neko_Chan.png 'Neko Chan UI Logo')

Downloads

13

Readme

Neko Chan UI

Neko Chan UI Logo

This is a small collection of lightweight reusable components for react/typescript projects.

Usage

npm install neko-chan-ui

Components

Carousel

An infinite scroll carousel. Create your own template items array that need to be displayed and use the Carousel component to have an awesome viewing experience.

Usage

import { Carousel } from 'neko-chan-ui';

const images = [
    'https://www.pokemon.com/static-assets/content-assets/cms2/img/pokedex/full/001.png',
    'https://www.pokemon.com/static-assets/content-assets/cms2/img/pokedex/full/004.png',
    'https://www.pokemon.com/static-assets/content-assets/cms2/img/pokedex/full/007.png'
];

const carousel_items = images.map((image, index) => {
    return (
        <div style={{ width: '80%', height: '80%', display: 'flex', flexDirection: 'column', gap: '20px', alignItems: 'center', justifyContent: 'center' }}>
            <h1>{`Pokemon #${index + 1}`}</h1>
            <img src={image} height={'80%'} width={'80%'} />
        </div>
    );
});

function App() {
    return (
        <div className="main">
            <Carousel items={carousel_items} />
        </div>
    );
}

export default App;

Demo

Carousel Demo

Floating Button

A floating button component. Attributes buttonColor to set color of the floating button, buttonContent to set what goes inside the button like an icon, a symbol, a character etc, buttonPressEffect to set if you want to have a button press effect when you click the button

Usage

import { FloatingButton } from 'neko-chan-ui';
import { FaAnchorCircleCheck } from 'react-icons/fa6';
import { useRef } from 'react';

function App() {
    const mainDivRef = useRef(null);
    const handleClick = () => {
        if (!mainDivRef.current) return;
        mainDivRef.current.style.background = 'lightgreen';
    };
    return (
        <div className="main" ref={mainDivRef}>
            <FloatingButton buttonColor="skyblue" buttonContent={<FaAnchorCircleCheck />} buttonPressEffect={true} onClick={handleClick} />
        </div>
    );
}

export default App;

Demo

Floating Button Demo

Multi Select

A multi select component. Attributes options is an array of selectable options which have a label and value, values is a state variable that holds an array of selected values, onAddOption is a method to add a value to the state variable values, onRemoveOption is a method to remove a value from the state variable values, onRemoveAll is a method to remove all the selected values in the state variable values

Usage

import { MultiSelect } from 'neko-chan-ui';
import { useState } from 'react';

function App() {
    const multiselectOptions = [
        {
            label: 'Charmander',
            value: 'Charmander'
        },
        {
            label: 'Squirtle',
            value: 'Squirtle'
        },
        {
            label: 'Mew',
            value: 'Mew'
        },
        {
            label: 'Bulbasaur',
            value: 'Bulbasaur'
        },
        {
            label: 'Greninja',
            value: 'Greninja'
        },
        {
            label: 'Celebi',
            value: 'Celebi'
        },
        {
            label: 'Heracross',
            value: 'Heracross'
        },
        {
            label: 'Typhlosion',
            value: 'Typhlosion'
        }
    ];

    const [multiSelectValues, setMultiSelectValues] = useState([multiselectOptions[0].value]);
    const onAddOption = (option: string) => {
        setMultiSelectValues((prev) => [...prev, option]);
    };
    const onRemoveOption = (option: string) => {
        setMultiSelectValues((prev) => prev.filter((value) => value !== option));
    };
    const onRemoveAll = () => {
        setMultiSelectValues([]);
    };

    return (
        <div className="main">
            <MultiSelect options={multiselectOptions} values={multiSelectValues} onAddOption={onAddOption} onRemoveOption={onRemoveOption} onRemoveAll={onRemoveAll} />
        </div>
    );
}

export default App;

Demo

MultiSelect Demo

Future Work

Add more resubale components and add ability to use the component code directly without having to install the library (in cases when you just need one component).