Skip to content

picyoh/react-simple-select

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-simple-select

r-simple-select

A simple and reusable Select component for React

This component is created by create-component-lib

Installation

The package can be installed via npm:

npm install r-simple-select --save

Or via yarn:

yarn add r-simple-select

Usage

The most basic use of the RsSelect can be described with:

import React from "react";
import RsSelect from "rs-select";

const Example = () => {
    const options = ["First", "Second", {name: "Third", abbreviation: "3rd" }]
    return (
        <RsSelect
            name={name} //id and name of select component
            options={options} //Array or Array of Objects
            title={title} //label's innerText
        />
    );
};

Minimum Usage

The minimum use of the RsSelect:

<RsSelect name={name} options={options} />

In this case the title will be set with the name parameter

License

Licensed under MIT license, see LICENSE for the full license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published