primait/pyxis-components/9.0.1

NOTE: the latest version is 9.0.3

Prima.Pyxis.Form.RadioFlag

Configuration

type RadioFlag model msg

Represents the configuration choice for the RadioFlag.

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

Represents a choice for the RadioFlag.

Configuration Methods

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

Creates the RadioFlag with a light skin.

radioFlagDark : (model -> Maybe Bool) -> (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 : 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 : 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 Type) -> RadioFlag model msg -> RadioFlag model msg

Adds a validation rule to the RadioFlag.