mc706/prefab-ui/4.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

withLayout : Layout -> 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.

withMessage : String -> Radio a msg -> Radio a msg

Add a help message of the radio buttons.

withDisabled : Bool -> Radio a msg -> Radio a msg

Disable the radio buttons.

Types

type Layout
= Vertical
| VerticalInline
| Horizontal
| HorizontalInline
| Compact

The arrangement of the radio buttons.