mc706/prefab-ui/2.0.0

NOTE: the latest version is 5.1.0

Prefab.Radio

A radio button group.

Creating

new :
{ label : String
, onChange : a -> msg
, selected : Maybe a
}
-> Radio a msg

Create a new radio button group.

view : List (Attribute msg) -> Radio a msg -> Element msg

View the radio button group.

Modifying

withArrangement : Arrangement -> Radio a msg -> Radio a msg

Change the arrangement of the radio buttons.

withOptions : List a -> Radio a msg -> Radio a msg

Change the options of the radio buttons.

withSerializer : (a -> String) -> Radio a msg -> Radio a msg

Change the serializer of the radio buttons.

Types

= Horizontal
| Vertical

The arrangement of the radio buttons.