peterszerzo/elm-natural-ui/7.0.0

NOTE: this package is not compatible with Elm 0.19.1

NaturalUi.LowLevel

Low-level types and helpers used to define custom nodes outside of the ones defined in this library.

Useful for defining pieces of UI that are coupled to a specific business logic that wouldn't belong in this library, but would benefit from a formal structure defined here.

type Setting state data msg
= Data data
| State state
| ToMsg (data -> msg)
| ToStatefulMsg (state -> data -> msg)
| ToAsyncStatefulMsg ((state -> data -> ( state, data )) -> msg)
| Id String
| Suggestions (List String)
| OnClick msg
| OnFocus msg
| OnBlur msg
| OnSuggestion (String -> msg)
| OnClose msg
| Enabled Bool
| Placeholder String
| Options (List String)
| Type String
| Autocomplete Bool
| Error
| Warning
| Discrete
| Css Style
| Children (List (Html msg))
| Popup (List (Html msg))
| Title String
| Body String
| Icon (Html msg)
| Help String
| Loading Bool
| Label String
| Url String
| Navigate (String -> msg)

All node settings in a single union type.

type alias CustomNode state data msg =
List (Setting state data msg) -> Html msg

Type definition for a custom node.