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

@piggytechng/component-library

v1.13.0

Published

A repository of components

Downloads

71

Readme

piggytech-ui-component-library

npm version Build status

Piggytech Internal UI Component Library based

Brief

This is a collection of various piggytech UI components built by the Piggytech Frontend Engineering team for faster and simpler web UI development.

Questions

For help and support questions, please reach out to us. This issue list of this repo is exclusively for bug reports and feature requests.

Note

Component lib version ~0.9.0 is compatible with typescript version ~3.7.2, while component lib version ~1.0.0 is a breaking change that makes use of typescript ~4.7.0.

Table of Contents

Features

Browser Support

Chrome | Firefox | Safari | Opera | Edge | IE | --- | --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |

Browser Matrix

Installing

//npm
$ npm install piggytech-ui-component-library

//yarn
$ yarn add piggytech-ui-component-library

//pnpm
$ pnpm add piggytech-ui-component-library

//bower
$ bower install piggytech-ui-component-library

Components

See full usage examples here from the browser.

  • Alert

    This is used for showing alerts to the user

    import {Alert} from "@piggytech-ui-component-library"
    
    // usage examples
    Alert.success("You have successfully. Done that");
    Alert.info("You have successfully. Done that");
    Alert.error("You have successfully. Done that");
    Alert.alert("loading", "qwertyu");

    type "success" | "error" | "info" | "loading" | "warn" options header: optional, actionBtnText: optional, message: String

  • Button

    Demo

    import {Button} from "@piggytech-ui-component-library"
    
    //usage examples
    <Button>Piggyvest</Button>
    <Button color="#000">Blackbell</Button>

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |id | string | Id selector | no| | |variant |"primary","secondary","tertiary"| button type |no|"primary"| |type |"button","reset","submit"| specify type of button default is "button" |no|"button"| |className | string | custom css |no|| |disabled|boolean|Removes the ability to click or target the component|no|false| |loading|boolean|disables button and shows a loader on it|no|false| |color|string|specify button color|no|"#0d60d8"| |children|ReactNode|This accepts slot components/html|no|| |borderRadius|string|change button border radius|no||
    |style|CSSProperties|custom css for target button|no|{}|

    Note: other button native attributes like "onClick" are still accessable

  • Input

    Demo

    import {Input} from "@piggytech-ui-component-library"
      
    //usage examples
    <Input></Input>
    
    <Input
     label="Tap here & enter .. (e.g 5000)"
     style={{ background: "whitesmoke" }}
     placeholder="Tap here & enter .. (e.g 5000)"
    /></Input>

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |id | string | Id selector | no| | |label|string|set the label for the input field|no|| |placeholder|set placeholder text for the input field|| |name|set name for the input field|no|| |type|can be "email", "text", "number" and so on (refer to native types)|no|"text"| |autofocus|automatically focus on the input when it is rendered|no|false| |value|"string" or "number"|set default value for input|no|| |style|CSSProperties|css styling for the input|no|| |labelStyle|CSSProperties|css styling for the input label|no|| |icon|boolean|show icon inside input|no|false| |disabled|boolean|change interaction with component|no|false| |rounded|boolean|add border radius to component|no|false| |borderRadius|string|set border radius of element|no|"5px"| |color|string|set input color of element|no|| |outlineColor|string|set outline color of input|no|| |backgroundColor|string|set background color of element|no|| |height|string|set height of input|no|| |width|string|set width of input|no|"100%"| |onChange|method|a callback functions that brings out the value inputed|no||

    Note: other input native attributes like "onClick" are still accessable

  • Textarea

    Demo

    import {Textarea} from "@piggytech-ui-component-library"
      
    //usage examples
    <Textarea></Textarea>
    
    <Textarea
     name="business-address"
     label="Business Address"
     style={{ background: "whitesmoke" }}
     placeholder="Enter your business address"
    ></Textarea>

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |id | string | Id selector | no| | |label|string|set the label for the input field|no|| |placeholder|set placeholder text for the input field|| |name|set name for the input field|no|| |autofocus|automatically focus on the input when it is rendered|no|false| |value|"string" or "number"|set default value for input|no|| |style|CSSProperties|css styling for the input|no|| |labelStyle|CSSProperties|css styling for the input label|no|| |disabled|boolean|change interaction with component|no|false| |rounded|boolean|add border radius to component|no|false| |borderRadius|string|set border radius of element|no|"5px"| |color|string|set input color of element|no|| |outlineColor|string|set outline color of input|no|| |backgroundColor|string|set background color of element|no|| |height|string|set height of input|no|| |width|string|set width of input|no|"100%"| |onChange|method|a callback functions that brings out the value inputed|no||

    Note: other textarea native attributes like "onClick" are still accessable

  • Select

    Demo

    import {Select} from "@piggytech-ui-component-library"
      
    //usage examples
    <Select></Select>
    
    <Select
     name="business-type"
     label="Business Type"
     style={{ background: "whitesmoke" }}
     options={['Fintech','Edtech']}
     placeholder="Select your business type"
    ></Select>

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |id | string | Id selector | no| | |label|string|set the label for the input field|no|| |placeholder|set placeholder text for the input field|| |name|set name for the input field|no|| |value|"string"|set default value for target component|no|| |style|CSSProperties|css styling for the target component|no|| |labelStyle|CSSProperties|css styling for the input label|no|| |isDisabled|boolean|change interaction with component|no|false| |borderRadius|string|set border radius of element|no|"5px"| |color|string|set input color of element|no|| |selectedColor|string|set the selected option color of element|no|| |outlineColor|string|set outline color of input|no|| |backgroundColor|string|set background color of element|no|| |height|string|set height of input|no|| |width|string|set width of input|no|"100%"| |options|Array|refer to react-select component options|no|| |onChange|method|a callback functions that brings out the value inputed|no||

  • Checkbox

    Demo

    import {Checkbox} from "@piggytech-ui-component-library"
    
    //usage examples
    <Checkbox></Checkbox>
    
    <Checkbox  label="Keep me logged in", color="#f72585"></Checkbox>
    

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |label|string|The label shown alongside the checkbox|yes|| |checked|boolean|state of the checkbox|no|false| |color|string|color of the checkbox when active|no|| |onChange|event|callback function returning the state of the checkbox when acted upon|no||

  • Switch

    Demo

    import {Switch} from "@piggytech-ui-component-library"
    
    //usage examples
    <Switch></Switch>
    
    <Switch value={true} color="#f72585"></Switch>
    

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |color|string|color for the switch when it is active|no|| |value|boolean|set default state of the switch|no|false| |outlineColor|string|set outline color of element|no|| |containerStyle|CSSProperties|css styling for the input|no|| |onChange|event|callback function returning the state of the element when acted upon|no||

  • Modal

    Demo

    import {Modal} from "@piggytech-ui-component-library"
      
    //usage examples
    <Modal></Modal>
    
    <Modal isOpen={true} >
    <!-- Modal content -->
    </Modal>
      

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |id | string | Id selector | no| | |showOverlayBackgroundColor|boolean|show overlay back|no|false| |outlineColor|string|set outline color of element|no|| |contentStyle|CSSProperties|css styling for the modal body|no|| |overlayStyle|CSSProperties|css styling for the modal overlay|no|| |children|ReactNode|This accepts slot components/html|no|| |onRequestClose|event|callback function called when the modal is cloed|no||

  • Loader

    import {Loader} from "@piggytech-ui-component-library"
    
    //usage example
    <Loader color="#f72585"></Loader>
    
    

    Props | name | Type | Description |Required|Default| |-------------|-----------------------|---------------------------|--------|-------| |color|string|color of the loader|no||

Credits

PiggyTech Engineering Team

License

MIT