fabiommendes / elm-daisy-ui / Daisy.Navigation

Simple navegational elements.

Tab and Breadcrumb live on their separated modules.

Styling links

See also: https://daisyui.com/components/link/

link : Daisy.Role.Role -> Html.Attribute msg

Style an element as a link

a [ href "/", link Primary ] [ text "Home" ]

linkHover : Html.Attribute msg

Show link style only on hover

a [ href "/", linkHover ] [ text "Home" ]

Steps

See also: https://daisyui.com/components/steps/

steps : (a -> Html msg) -> Daisy.Role.Role -> List (Html.Attribute msg) -> List a -> List a -> Html msg

Show an horizontal list of steps

-- a step function specialized in rendering strings
stepTexts = steps text Primary

stepTexts []
    [ "completed 1", "completed  2" ]
    [ "missing 1", "missing 2" ]

Pagination

See also: https://daisyui.com/components/pagination/

pagination : ( Basics.Int, Basics.Int, Basics.Int ) -> (Basics.Int -> Html.Attribute msg) -> Html msg

A simple numeric pagination from a triplet with of (min, selected, maximum) integers and a function that computes an action from the numeric value associated with the button.

pagination ( 1, 3, 5 ) action

will display the list of numbers [1, 2, *3*, 4, 5]

Action is a function that takes the display number and computes an attribute, usually it will be something like

action i =
    onClick (OnPaginateTo (i - 1))

To-do

Button navigation: https://daisyui.com/components/bottom-navigation/ Menu: https://daisyui.com/components/menu/ Navbar: https://daisyui.com/components/navbar/