JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q32781F
  • License MIT

react select dropdown component

Package Exports

  • react-library-senga
  • react-library-senga/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-library-senga) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-library-senga

A React library for creating custom Select components.

prerequisites

  • react
  • react-dom
  • npm

Repository

CodeSandbox

try it on CodeSandBox

installation

install with npm:

npm install react-library-senga

install with yarn:

yarn add react-library-senga

using options

You can pass an array of options to the options prop to define the possible choices in the dropdown menu. Each option should have a value and a label. Here's an example:

import React from 'react';
//import the Select component 
import Select from 'react-library-senga';

function MySelect(){
  //customise your options
   const optionList = [
      {value: 'option1', label: 'Option 1'},
      {value: 'option2', label: 'Option 2'},
      {value: 'option3', label: 'Option 3'},
   ];

    return (
        <Select
        options={optionList}
        />
    );
}

export default MySelect;