Skip to content

Latest commit

 

History

History
63 lines (52 loc) · 3.25 KB

README.md

File metadata and controls

63 lines (52 loc) · 3.25 KB

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