fabiommendes/elm-daisy-ui/1.0.0

Daisy.Breadcrumbs

Navegation elements

Config url msg
-> List (Attribute msg)
-> List ( url, Name )
-> Html msg

Render breadcrubms

unlinkLast : List ( Url, Name ) -> List ( Url, Name )

Transform the last pair (url, name) to ("", name), disabling its hyperlink.

Config

type alias Config url msg =
{ home : Maybe url
, icon : Svg msg
, element : Element msg
, link : url -> List (Attribute msg)
, empty : url -> Bool
}

Store information on how to render a breadcrumb

config : List (Config Url msg -> Config Url msg) -> Config Url msg

Simple config for breadcrumb view

config [ home "/home/", icon I.folder ]
configCustom : List (Config url msg -> Config url msg) -> Config url msg

Custom config for breadcrumbs view

empty : (url -> Bool) -> Config url msg -> Config url msg

Function that determines if links are valid or not

home : url -> Config url msg -> Config url msg

Define the home URL

icon : (Int -> Coloring -> Svg msg) -> Config url msg -> Config url msg

Set the home icon

noHome : Config url msg -> Config url msg

Disable the home url