{ index : Basics.Int
, size : Basics.Int
}
The tab state
Opaque messages
init : Config a msg -> Model
Initial tab state.
Store this in your model.
view : Config a msg -> Model -> a -> Html msg
Render tabs from config and tab state
update : Msg -> Model -> Model
Update function
index : Model -> Basics.Int
Return the index of the currently selected tab.
setIndex : Basics.Int -> Model -> Model
Force selected tab to the given index
title : Config a msg -> Model -> String
Return the tab title from the currently selected tab.
{ msg : Msg -> msg
, tabs : List ( String
, a -> Html msg )
}
Declare how tabs are rendered and integrated to the rest of the application
config : (Msg -> msg) -> List ( String, a -> Html msg ) -> Config a msg
Create a config object.
It is necessary to pass the message wrapper in your module and a list of pairs with (title, render) with the name of the tab and the render function for the corresponding tab.