Skip to content
Image and general purpose content gallery with touch support
Elm
Branch: master
Clone or download
Latest commit d932671 Oct 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Upgrade to 0.19 Oct 15, 2018
src Upgrade to 0.19 Oct 15, 2018
tests Init commit Aug 2, 2018
LICENSE Init commit Aug 2, 2018
README.md Update readme Oct 15, 2018
elm.json Bump version Oct 15, 2018

README.md

Elm-gallery

A simple content and/or image gallery with touch and keyboard navigation.

example live | example code

Example code

type alias Model =
    { gallery : Gallery.State }


init : Model
init =
    { gallery = Gallery.init (List.length someSlides) }


type Msg
    = GalleryMsg Gallery.Msg


update : Msg -> Model -> Model
update msg model =
    case msg of
        GalleryMsg msg ->
            { model | gallery = Gallery.update msg model.gallery }


view : Model -> Html Msg
view model =
    Html.map GalleryMsg <|
        Gallery.view config model.gallery [ Gallery.Arrows ] someSlides


config : Gallery.Config
config =
    Gallery.config
        { id = "image-gallery"
        , transition = 500
        , width = Gallery.vw 60
        , height = Gallery.px 400
        }

Images by

esa

You can’t perform that action at this time.