marko-select

0.0.4 • Public • Published

marko-select

Select Input control for MarkoJS

Installation

npm install marko-select

or

yarn add marko-select

Then use it in your app:

Usage

<Select class="my-select-input"
        inputClass="form-control"
        menuClass="animated faster slideInDown"
        name="country"
        value=state.selectedCountry
        placeholder="Select Country"
        searchable=true
        options=[
          { label: "United State", value: "US" },
          { label: "France", value: "FR" }
        ]
        on-change("onHandlerChange")
        on-menu-open( () => console.log('menu-open') )
        on-menu-close( () => console.log('menu-close') )/>

Inputs Properties

Common props you may want to specify include:

  • class - apply a class to the control container
  • inputClass - apply a class to the control input
  • menuClass - apply a class to the control options menu
  • disabled - disable the control
  • autoFocus - focus the control when it mounts
  • searchable - allow the user to search for matching options
  • name - generate an HTML input with this name, containing the current value
  • options - specify the options the user can select from
  • placeholder - change the text displayed when no option is selected
  • value - control the current value

Events

  • on-change - subscribe to select change events
  • on-menu-open - subscribe to menu open events
  • on-menu-close - subscribe to menu close events

Feedback & Contribution

You know the say: No one is whole alone! So, feedbacks are all welcome. Kindly report any encounted Issues here and I'll be glad to work on it right away. Thank you.

License

This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.

Readme

Keywords

Package Sidebar

Install

npm i marko-select

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

10.2 kB

Total Files

6

Last publish

Collaborators

  • fabrice8