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 77a30ed727b0 of https://github.com/aDifferentJT/elm-bootstrap (zip prefix nixCodeX-elm-bootstrap-77a30ed/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 d4637469f6c86d5f9055b35cec2e56a92970c868.
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/2.0.1/
An accordion is a group of stacked cards where you can toggle the visibility (slide up/down) of each card
type alias Model =
{ accordionState = Accordion.state }
init : (Model, Cmd Msg)
init =
( { accordionState = Accordion.initialState }, Cmd.none )
type Msg
= AccordionMsg Accordion.State
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
AccordionMsg state ->
( { model | accordionState = state }
, Cmd.none
)
view : Model -> Html Msg
view model =
Accordion.config AccordionMsg
|> Accordion.withAnimation
|> Accordion.cards
[ Accordion.card
{ id = "card1"
, options = []
, header =
Accordion.header [] <| Accordion.toggle [] [ text "Card 1" ]
, blocks =
[ Accordion.block []
[ Block.text [] [ text "Lorem ipsum etc" ] ]
]
}
, Accordion.card
{ id = "card2"
, options = []
, header =
Accordion.header [] <| Accordion.toggle [] [ text "Card 2" ]
, blocks =
[ Accordion.block []
[ Block.text [] [ text "Lorem ipsum etc" ] ]
]
}
]
|> Accordion.view model.accordionState
-- You need to do this wiring when you use animations !
subscriptions : Model -> Sub Msg
subscriptions model =
Accordion.subscriptions model.accordionState AccordionMsgCreates an initial/default view configuration for an accordion.
Define the cards that your accordion should consist of
Set option for using animations for sliding card contents up/down.
Note: You must remember to hook up the subscriptions function
when using this option.
Set option for only allowing one (or zero) open cards at any one time.
Check if given card is open/expanded (or when animating, on it's way to become open/expanded).
NOTE: If you give a non-existing id it will return False (:
Opaque type that defines the view configuration information of your accordion
config functionwithAnimtion function allows you to define that the contents of cards should animate up/downcards function defines the List of cards to be displayedInitial state for the accordion. Typically used from your main init function
Initial state with card that matches given id expanded.
Opaque representation of the view state for the accordion
Creates a card item for use in an accordion
id Unique id for your cardoptions List of card styling optionsheader Card header containing a toggle to hide/show the details of a cardblocks The main content elements of the cardCreate a block element for use in an accordion card.
Accordion.block []
[ Block.text [] [ text "Just some text" ] ]blockOptions List of block optionsblockItems List of block itemsCreate a List Group element for use in an accordion.
List groups are block elements just like block
Accordion.listGroup
[ ListGroup.li [] [ text "Item 1" ]
, ListGroup.li [] [ text "Item 2" ]
]items List of List group itemsCreates a card toggle element used for toggling the display of the main content of your cards
attributes List of attributeschildren List of child elementsCreate an accordion card header but rather than a div, using a h1 element
Create an accordion card header but rather than a div, using a h2 element
Create an accordion card header but rather than a div, using a h3 element
Create an accordion card header but rather than a div, using a h4 element
Create an accordion card header but rather than a div, using a h5 element
Create an accordion card header but rather than a div, using a h6 element
Add elements after the toggle element in a accordion card header. Order matters if you're using both prependHeader and appendHeader. Specifically, it should be toggle |> appendHeader |> prependHeader.
Add elements before the toggle element in a accordion card header. Order matters if you're using both prependHeader and appendHeader. Specifically, it should be toggle |> appendHeader |> prependHeader.
Opaque representation of a card item
Opaque representation of a card block element
Opaque type representing the header for an accordion card
Opaque representation of toggle element for initiating slide up/down for a card
When using animations you must remember to call this function for your main subscriptions function
subscriptions : Model -> Sub Msg
subscriptions model =
Accordion.subscriptions model.accordionState AccordionMsgstate The current view state of the accordiontoMsg Message constructor function that is used to step the view state forward
Create an interactive accordion element
stateThe current view stateconfigThe configuration for the display of the accordion