mc706 / prefab-ui / 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 (Element.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 : Basics.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.