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

react-input-ui

v1.0.6

Published

Collection of input fields for ReactJs

Downloads

37

Readme

React Input UI Collection


DEMO Note: React version 16.8.0


Inspiration from codrops

Form inputs offer a great opportunity to add some subtle and interesting effects to a web page. They are elements that your user will interact with at some point and making them fun to use can enhance the experience. We are used to the default form resembling its paper counterpart but in the digital world we can be more creative

List of components :

  1. InputAkira
  2. InputIchiro
  3. InputJiro
  4. InputKuro
  5. InputMadoka
  6. InputMaterial
  7. InputMinoru
  8. InputNao
  9. InputSoda
  10. InputYoko

Example

 import React, {useState} from 'react';
 import InputAkira from 'react-input-ui/collection/akira';
 
 function App() {
   const [value, setValue] = useState('');

   return (
     <InputAkira
       label={'Akira UI'}
       placeholder='type...'
       onChanhe={setValue}
       value={value}
     />
   )
 }

Example with custom style

If you need change style for label or input tag, just use property:

labelStyle inputStyle

in other cases: style className

 import React, {useState} from 'react';
 import InputAkira from 'react-input-ui/collection/akira';
 
 function App() {
   const [value, setValue] = useState('');
 
   return (
     <InputAkira
       label={'Akira UI'}
       placeholder='type...'
       onChanhe={setValue}
       value={value}
       style={{margin: '25px'}}
       className={'custom-class'}
       labelStyle={{fontSize: '18px'}}
       inputStyle={{fontSize: '21px'}}
     />
   )
 }

Example for validation field

If field not valid set property error to true

If field valid set property error to false

If don't need validation set property error to null

 import React, {useState} from 'react';
 import InputAkira from 'react-input-ui/collection/akira';
 
 function App() {
   const [value, setValue] = useState('');
   const [error, setError] = useState(null);
  
   const handleChange = e => {
     setValue(e.target.value);
   };

   const handleFocus = () => {
     setError(null);
   };

   const handleSubmit = () => {
     setError(!!value.length > 2);
   }
   
   return (
     <div>
       <InputAkira
         label={'Akira UI'}
         placeholder='type...'
         onChange={handleChange}
         onFocus={handleFocus}
         value={value}
         error={error}
       />
       <button onClick={handleSubmit}>SUBMIT</button>
     </div>
   )
 }

Example for customizing theme

Theme has 4 property:

| Theme property: | | --- | | activeTextColor | | focusColor | | hoverColor | | mainColor |

To change them use theme method

 import React, {useState} from 'react';
 import InputAkira, {theme} from 'react-input-ui/collection/akira';

 function App() {
   const [value, setValue] = useState('');
  
   const handleSetTheme = () => {
     theme({
       activeTextColor: '#101010',
       focusColor: '#2196f3',
       hoverColor: '#252525',
       mainColor: '#727272',
     })
   };
   
   return (
     <div>
       <InputAkira
         label={'Akira UI'}
         placeholder='type...'
         onChanhe={setValue}
         value={value}
       />
     <button onClick={handleSetTheme}>CHANGE THEME</button>
     </div>
   )
 }