lue-bird/elm-scroll - version: 1.0.5

for more information visit the package's GitHub page

Package contains the following modules:

items rolled up on both sides of a focus

📜 Scroll

→ good fit for dynamic choice selection: tabs, playlist, ... ↑ examples

Scroll can even focus a gap Down or Up from every item

import Linear exposing (Direction(..))
import Emptiable exposing (filled)
import Stack exposing (topBelow)
import Scroll exposing (Scroll, FocusGap)

Scroll.empty
    --: Scroll item_ FocusGap Possibly
    |> Scroll.focusAlter (\_ -> -1 |> filled)
    --: Scroll number_ FocusGap never_
    |> Scroll.sideAlter Up
        (\_ -> topBelow 1 [ 2, 3 ])
    --: Scroll number_ FocusGap never_
    |> Scroll.toGap Up
    --: Scroll number_ FocusGap Possibly
    |> Scroll.focusAlter (\_ -> 0 |> filled)
    --: Scroll number_ FocusGap never_
    |> Scroll.toStack
--> topBelow -1 [ 0, 1, 2, 3 ]

suggestions?

→ See contributing.md

alternatives