# elm-ui-dropdown

A dropdown component for
[Elm-UI](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/)
providing:

## Button or TextField Elements

Choose between a
[Button](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element-Input#button)
or a
[TextField](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element-Input#text)
as the root element.

## Keyboard Navigation and Selection

[UP] & [DOWN] arrows will traverse up and down the menu.

[ENTER] will select the current menu option.

[ESC] will hide the menu.

[DOWN] arrow will show the menu if the menu is hidden and the root element
has focus.

## Positionable Elements

Position the label and menu above, below, left or right of the root element
or hide the label completely.

## Customisable Elements

All elements can be styled independently by providing their own list of
[Attributes](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element#Attribute)
.

## Option Filtering

Filter the menu options as the user enters text in the TextField.

---

## Install

`elm install phollyer/elm-ui-dropdown`

---

## Examples

See the
[examples folder](https://github.com/phollyer/elm-ui-dropdown/tree/master/examples)
for some examples. Use `elm reactor` to try them out locally.

---

## Docs

Package docs are
[here](https://package.elm-lang.org/packages/phollyer/elm-ui-dropdown/latest/Dropdown)
.

---

## Issues

Please log any bugs as an
[issue](https://github.com/phollyer/elm-ui-dropdown/issues).

Feature requests and suggestions are welcome, please log them as an issue too.

Pull requests are also welcome.
