GithubHelp home page GithubHelp logo

trendingtechnology / react-search-field Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nutboltu/react-search-field

0.0 0.0 0.0 2.64 MB

An elegant search field component for React.

Home Page: https://nutboltu.github.io/react-search-field

JavaScript 89.60% HTML 7.34% CSS 3.06%

react-search-field's Introduction

React Search Field

dependencies Status Build Status

NPM

An elegant search field component for React.

See Demo and Documentation.

Screenshot

Props

The component takes the following props.

Prop Type Description
classNames string Additional classnames for the component
searchText string Initial search value of the input
placeholder string placeholder for the search input
onChange function Callback function to invoke when the user press any key. The function should contain two parameters(value, event).
onEnter function Callback function to invoke when the user press enter after pressing few keys. The function should contain two parameters(value, event).
onSearchClick function Callback function to invoke when the user click the search button. The function should contain one parameter(value).

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 2018.

react-search-field's People

Contributors

dependabot[bot] avatar nutboltu avatar ralph-dev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.