Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-search-field

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-search-field

This is a simple search field component for react

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-0.25%
Maintainers
1
Weekly downloads
 
Created
Source

React Search Field

dependencies Status Actions Status Follow @nutboltu

NPM

An elegant search field component for React.

See Demo and Documentation.

Screenshot

Props

The component takes the following props.

PropTypeDescription
classNamesstringAdditional classnames for the component
searchTextstringInitial search value of the input
placeholderstringplaceholder for the search input
disabledbooleanDisabling the search input
onChangefunctionCallback function to invoke when the user press any key. The function should contain two parameters(value, event).
onEnterfunctionCallback function to invoke when the user press enter after pressing few keys. The function should contain two parameters(value, event).
onSearchClickfunctionCallback function to invoke when the user click the search button. The function should contain one parameter(value).
onBlurfunctionCallback function to invoke when the user blurs the search box. The function should contain two parameters(value, event).

Installation

npm install react-search-field --save

Usage

import SearchField from "react-search-field";

<SearchField
  placeholder="Search..."
  onChange={onChange}
  searchText="This is initial search text"
  classNames="test-class"
/>

Run

npm start

License

MIT Licensed. Copyright (c) Farhad Yasir 2021.

Keywords

FAQs

Package last updated on 11 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc