primait / pyxis-components / Prima.Pyxis.Form.RadioFlag

Configuration


type RadioFlag model msg

Represents the configuration choice for the RadioFlag.


type alias RadioFlagChoice =
{ value : Basics.Bool
, label : String 
}

Represents a choice for the RadioFlag.

Configuration Methods

radioFlagLight : (model -> Maybe Basics.Bool) -> (Basics.Bool -> msg) -> RadioFlag model msg

Creates the RadioFlag with a light skin.

radioFlagDark : (model -> Maybe Basics.Bool) -> (Basics.Bool -> msg) -> RadioFlag model msg

Creates the RadioFlag with a dark skin.

Rendering

render : model -> RadioFlag model msg -> List (Html msg)

Renders the RadioFlag.

Options

withAttribute : Html.Attribute msg -> RadioFlag model msg -> RadioFlag model msg

Sets an attribute to the Radio config.

withClass : String -> RadioFlag model msg -> RadioFlag model msg

Sets a class to the Radio config.

withDisabled : Basics.Bool -> RadioFlag model msg -> RadioFlag model msg

Sets a disabled to the Radio config.

withId : String -> RadioFlag model msg -> RadioFlag model msg

Sets an id to the Radio config.

withName : String -> RadioFlag model msg -> RadioFlag model msg

Sets a name to the Radio config.

Event Options

withOnBlur : msg -> RadioFlag model msg -> RadioFlag model msg

Sets an onBlur event to the Radio config.

withOnFocus : msg -> RadioFlag model msg -> RadioFlag model msg

Sets an onFocus event to the Radio config.

Validation

withValidation : (model -> Maybe Prima.Pyxis.Form.Validation.Type) -> RadioFlag model msg -> RadioFlag model msg

Adds a validation rule to the RadioFlag.