Skip to content

lue-bird/elm-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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