fabiommendes / elm-daisy-ui / Daisy.Breadcrumbs

Navegation elements

Breadcrumbs

view : Config url msg -> List (Html.Attribute msg) -> List ( url, Types.Name ) -> Html msg

Render breadcrubms

unlinkLast : List ( Types.Url, Types.Name ) -> List ( Types.Url, Types.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 : Types.Element msg
, link : url -> List (Html.Attribute msg)
, empty : url -> Basics.Bool 
}

Store information on how to render a breadcrumb

config : List (Config Types.Url msg -> Config Types.Url msg) -> Config Types.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 -> Basics.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 : (Basics.Int -> Material.Icons.Types.Coloring -> Svg msg) -> Config url msg -> Config url msg

Set the home icon

link : (url -> List (Html.Attribute msg)) -> Config url msg -> Config url msg

Control which attributes are added to valid links

noHome : Config url msg -> Config url msg

Disable the home url