@mpen/react-basic-inputs

0.2.7 • Public • Published

@mpen/react-basic-inputs

Thin wrappers around native input elements to make them behave better.

Installation

bun add --dev @mpen/react-basic-inputs
# or
yarn add @mpen/react-basic-inputs
# or
npm install @mpen/react-basic-inputs

Links

Components

Select

Like <select> but takes an options prop instead of children.

  • The values are typed; they can be anything, not just string
  • Duplicate values are OK. e.g. if you want to put "United States" at the top of your country list and then again in alphabetical order, it will just work
  • Each <option> will automatically be assigned a unique React key
  • If the current value cannot be found in the list of options it will be appended to the end
    • If you want to override this behavior, set invalidValueOption
  • placeholder prop

Readme

Keywords

none

Package Sidebar

Install

npm i @mpen/react-basic-inputs

Weekly Downloads

7

Version

0.2.7

License

none

Unpacked Size

22.8 kB

Total Files

5

Last publish

Collaborators

  • mnpenner