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

flash-package

v0.3.2

Published

A highly customizable and lightning-fast component library featuring Input Text, Number, Checkbox, Dropdown, Color Picker, and more. Modify colors, fonts, and styles to suit your needs.

Downloads

7

Readme

flash-component

A highly customizable and lightning-fast component library featuring Input Text, Number, Checkbox, Dropdown, Color Picker, and more. Modify colors, fonts, and styles to suit your needs.

Components

InputText: A customizable text input component with placeholder, label, and icon support. InputNumber: A number input field for numeric data, with customizable label, icon, and helper text. RadioButton: An elegant radio button for selection, customizable orientation and icons. ToggleSwitch: A toggle switch for enabling or disabling options, with customizable labels and icons. Checkbox: A flexible checkbox input with customizable label, icons, and orientation. Dropdown: A select dropdown with support for icons and multiple options. TextArea: A text area for multi-line input, customizable rows, columns, and labels. ColorPicker: A color picker component to choose colors with icon and customizable label. Slider: A customizable range slider with step intervals and labels.

Installation

npm install flash-component

Components

import {
  Checkbox,
  ColorPicker,
  Dropdown,
  InputNumber,
  InputText,
  RadioButton,
  Slider,
  TextArea,
  ToggleSwitch,
} from "flash-package";
import "flash-package/dist/index.css";
import { useState } from "react";

const options = [
  { value: "Option 1", label: "Always Off" },
  { value: "Option 2", label: "Option 2" },
  { value: "Option 3", label: "Option 3" },
];

export default function App() {
const [form, setForm] = useState({
    text: "dd",
    number: 9,
    radio: "radio1",
    toggle: true,
    checkbox: true,
    dropDown: "",
    textarea: "textAreaaaa",
    color: "#000000",
    slider: 2,
  });
  const onChange = (name: string, value: string | boolean | number) => {
    setForm((prevState: any) => ({
      ...prevState,
      [name]: value,
    }));
  };
  return (
    <div className="w-[100%] h-[100%]">
     <InputText
          name="username"   //Required
          value={form?.username}  //Required
          onChange={onChange} //Required
          label="Username"
          placeholder="Username"
          className="textClassName"   //To Target CSS class
          fieldName="fmt"
          orientation="vertical"   //vertical | horizontal | horizontal_reverse | vertical_reverse
          helperText="help text"  
          disabled={false}
          icon={<Icon />}
          // ref={}
        />

         <InputNumber
          name="number"   //Required
          value={form?.number}    //Required
          onChange={onChange}   //Required
          label="Number"
          fieldName="num"
          icon={<Icon />}
          placeholder="place"
          orientation="vertical"
          className="numberClassName"   
          disabled={false}
          helperText="help text"
          // ref={}
        />
         <RadioButton
          name="radio" //Required
          onChange={onChange}   //Required
          orientation="horizontal"
          helperText="helpertext"
          icon={<Icon />}
          value="radio1"
          isSelected={form?.radio === "radio1"}   //Required
          label="Yes, the survey was conducted"
          className="radioClassName"
          disabled={false}
          // ref={}
        />
         <RadioButton
          name="radio"
          onChange={onChange}
          orientation="horizontal"
          helperText="helpertext"
          icon={<Icon />}
          value="radio2"
          isSelected={form?.radio === "radio2"}
          label="Yes, the survey was conducted"
          className="radioClassName"
          disabled={false}
          // ref={}
        />
         <ToggleSwitch
          name="toggle"   //Required
          labelText="LPR Detection"
          onChange={onChange}   //Required
          value={form?.toggle}    //Required
          className="toogleSwitchClassName"
          labelA="ENABLE"
          labelB="DISABLE"
          sideLabel={true}
          disabled={false}
          // ref={}
        />
         <Checkbox
          name="checkbox"   //Required
          onChange={onChange}   //Required
          value={form?.checkbox}  //Required
          label="CHeckBox"
          icon={<Icon />}
          orientation="vertical"
          disabled={false}
          className="checkboxClassName"
          // ref={}
        />
        <Dropdown
          name="dropDown"     //Required
          value={form?.dropDown}     //Required
          options={options}     //Required
          label="Alert with sound"
          onChange={onChange}     //Required
          Lefticon={<Icon />}
          Righticon={<Icon />}
          slice={10}
          className="dropdownClassName"
          disabled={false}
          // ref={}
        />
        <TextArea
          name="textarea"   //Required
          onChange={onChange}   //Required
          value={form?.textarea}    //Required
          label="Textarea label"
          cols={3}    //Required
          rows={3}    //Required
          icon={<Icon />}
          placeholder="place"
          orientation="vertical"
          className="textareaClass"
          disabled={false}
          helperText="helper text"
          // ref={}
        />
         <ColorPicker
          name="color"    //Required
          value={form?.color}   //Required
          icon={<Icon />}
          label="color picker"
          onChange={onChange}   //Required
          orientation=""
          defaultDiv={<p>color pic</p>}
          className="colorPickerClassName"
          disabled={false}
          // ref={}
        />
        <Slider
          name="slider"   //Required
          value={form?.slider}    //Required
          label="Slider Label"
          max={10}  //Required
          min={0}   //Required
          icon={<Icon />}
          onChange={onChange}   //Required
          step={2}
          orientation="vertical"
          className="sliderClassName"
          disabled={false}
          // ref={}
        />
    </div>
  )

}