Skip to content

wangel13/elm-combobox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-combobox (example)

How to use

Write elm-code for combobox use:

  Combobox.view [class "combobox custom-skin1"] (LC.create ComboAction1 actionChannel) model.combo1

You can change combobox style by adding css-classes .custom-skin, default class .combobox, in css/style.css. There are predefined black - .custom-skin1 & white - .combobox classes.

Elm generate html:

<div class="combobox custom-skin1">
  <input type="text">
  <div class="fadeIn combobox-list">
    <div class="combobox-list-item combobox-active">
      Your data
    </div>
    <div class="combobox-list-item">
      Your data
    </div>
  </div>
</div>

Data pushing in model:

initialModel = { combo1 = Combobox.initialModel Countries.list 10
               , combo2 = Combobox.initialModel Countries.list  5}

5, 10 - Custom Int size of dropdown list

About

Combobox example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published