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 🙏

© 2026 – Pkg Stats / Ryan Hefner

asireact-formcomponents

v1.0.33

Published

Execute one of the following commands in powershell ```shell

Readme

Asitis React Formcomponent

Installation

Execute one of the following commands in powershell


  # Yarn users
  yarn global add asireact-formcomponents

  # NPM users
  npm install --save asireact-formcomponents

Usage

To import specific or multiple components from this library use the following:

  import { AutoComplete, FileUpload } from 'asireact-formcomponents'

Components

Props / parameters

| Prop | Type | Required | Description | Default value | |:-----------|:--------:|:---------|:------------------------------------------------------------|:----------------------------| | onChange | function | NO | Callback from input & selection | | | onSelect | function | NO | Callback from selection | | | keywords | array : string | YES | Keywords from which the autocomplete will match the input to | | | name | string | NO | Name / identifier of input field | | | label | string | NO | Optionable label for input | | | error | string | NO | Optionable error message for label (requires label for effect) | | | debug | bool | NO | Adds pre-tag with debug info | false | | multi | bool | NO | Allows multiple word completion | false | | value | string | NO | Control value from parent component | | style | object | NO | Style object to customize component | | | className | string | NO | Adds class to component.. hio hio | |

Example

import React, { Component } from 'react'
import { AutoComplete } from 'asireact-formcomponents'

class Example extends Component {

  handleAutoComplete(value, name){
    console.log(`AutoComplete ${name} returned text: ${value}`)
  }

  render() {
    const { multi, debug } = this.state
    return (
        <AutoComplete style={{marginTop: 50}} name='example' onChange={this.handleAutoComplete} />
    )
  }
}

export default Example

Props / parameters

| Prop | Type | Required | Description | Default value | |:-----------|:--------:|:---------|:------------------------------------------------------------|:----------------------------| | return | function | YES | Function to handle dropped files | | | accept | string | NO | Accepted filetypes e.x. '.pdf, .xps' | | | dragText | string | NO | Large header text | 'DRAG FILES HERE' | | selectText | string | NO | Informative text that user can choose to open file browser | 'select from your computer' | | dragText | string | NO | Text inbetween header and informative text | 'or' | | style | object | NO | Style object to customize component | | | className | string | NO | Adds class to component.. hio hio | |

Example

import React, { Component } from 'react'
import { FileUpload } from 'asireact-formcomponents'

class Example extends Component {

  constructor(props) {
    super(props)
    this.handleSubmit = this.handleSubmit.bind(this)
    this.handleFiles = this.handleFiles.bind(this)
  }

  handleSubmit(e) {
    if (this.state.files.length > 0) {

      // Create formdata and append files
      var fd = new FormData()
      this.state.files.forEach(function (file) {
        fd.append('files[]', file, file.name)
      })

      // Upload files to server
      axios.post('/upload', fd)
        .then(res => this.props.createAlert('success', res.data))
        .catch(err => this.props.createAlert('error', err.message))

      // Reset state  
      this.setState({ files: [] })
    }
  }

  // Function passed to component to receive dropped files
  handleFiles(files){
    this.setState({files})
  }

  render() {
    return (
      <div>
        <FileUpload return={this.handleFiles}/>
        <input type='submit' value='submit' onClick={this.handleSubmit} />
      </div>
    )
  }
}

export default Example