Renamed to aDifferentJT/elm-bootstrap. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as nixCodeX/elm-bootstrap still install under that name. 13 versions of 13 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/aDifferentJT/elm-bootstrap.
What we checked: The repo moved to github.com/aDifferentJT/elm-bootstrap. Rebuilt with git archive from commit 5d1f6b7107c3 of https://github.com/aDifferentJT/elm-bootstrap (zip prefix nixCodeX-elm-bootstrap-5d1f6b7/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 77289049167ffc101ed61a4853cd21322ed159f8.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/nixCodeX/elm-bootstrap/zipball/3.0.0/
Use tabs to create tabbable regions. Tabs uses view state, so there is a little bit of wiring needed to use them.
-- example with animation, you can drop the subscription part when not using animations
type alias Model =
{ tabState : Tab.State }
init : ( Model, Cmd Msg )
init =
( { tabState = Tab.initalState }, Cmd.none )
type Msg
= TabMsg Tab.State
update : Msg -> Model -> ( Model, Cmd msg )
update msg model =
case msg of
TabMsg state ->
( { model | tabState = state }
, Cmd.none
)
view : Model -> Html msg
view model =
Tab.config TabMsg
|> Tab.withAnimation
-- remember to wire up subscriptions when using this option
|> Tab.right
|> Tab.items
[ Tab.item
{ id = "tabItem1"
, link = Tab.link [] [ text "Tab 1" ]
, pane = Tab.pane [] [ text "Tab 1 Content" ]
}
, Tab.item
{ id = "tabItem2"
, link = Tab.link [] [ text "Tab 2" ]
, pane = Tab.pane [] [ text "Tab 2 Content" ]
}
]
|> Tab.view model.tabState
subscriptions : Model -> Sub Msg
subscriptions model =
Tab.subscriptions model.tabState TabMsgUse this function to create the inital state for the tabs control
Use this function if you want to initialize your tabs control with a specific tab selected.
**NOTE: ** Should you specify an id not found, the first tab item will be displayd by default
Configuration for a tabs control
toMsg Message constructor function used for transitioning view stateoptions Customization options for the tabs controlwithAnimation Option to enable a simple fade in animation for tabs.items List of tab itemsNOTE When using animations you must also remember to set up subscriptions
Opaque type representing the view state of the tabs control
Option to make the tab menu items display with a pilled/buttonish look
Option to add a fade in/out animation effect when switching tabs
Space out tab menu items evenly accross the the whole tabs control width
Space out tab menu items to use the entire tabs control width, as opposed to justified items will not get equal widths
Use this function when you need additional customization with Html.Attribute attributes for the tabs control
By default the click handler for tabs has preventDefault true. If however you want the url hash to be updated with the tab item id, you may use this function to ensure the url is changed when users click on a tab item. This is handy if you use "real"" paths for your SPA pages but also want to be able to "deep-link" to a particular tab item.
Opaque type representing customization options for a tabs control
Create a composable tab item
id A unique id for the tab itemlink The link/menu for the tab itempane The content part of a tab itemCreates a composable tab menu item
attributes List of attributeschildren List of child elementsCreates a composable tab menu pane
attributes List of attributeschildren List of child elementsOpaque type representing a tab item
Opaque type representing a tab item link
Opaque type representing a tab item pane
When using animations you must remember to wire up this function to your main subscriptions
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.batch
[ Tab.subscriptions model.tabState TabMsg
-- ...other subscriptions you might have
]
Creates a tab control which keeps track of the selected tab item and displays the corresponding tab pane for you