A navigation thingy.
The first list of attributes is for a nav.breadcrumb tag. The second is for an inner ul tag.
type Msg
= GoHome
| GoAway
| GoTeam
myBreadCrumb : Html Msg
myBreadCrumb =
breadcrumb breadcrumbModifiers
[]
[]
[ crumblet False [] [ onClick GoHome ]
, crumblet False [] [ onClick GoAway ]
, crumblet False [] [ onClick GoTeam ]
, crumblet True [] []
]A convenience element for breadcrumb.
The first attribute list applies to the outer li tag. The second attribute list applies to the inner a tag.
The card component comprises several elements that you can mix and match.
card is the main container for the card-partitions.
myCard : Html msg
myCard =
card []
[ cardImage [] []
, cardContent [] []
]A horizontal bar with a shadow.
myCardHeader : Html msg
myCardHeader =
cardHeader []
[ cardTitle []
[ text "Queen of Hearts"
]
, cardIcon []
[ icon Standard
[]
[ heart_o
]
]
]type Msg
= ShowCard
myIcon : Html msg
myIcon =
icon Standard [] [ diamond ]
myCardHeader : Html Msg
myCardHeader =
easyCardHeader []
{ title = [ text "4 of Diamonds" ]
, icon = [ myIcon ]
, onClickIcon = ShowCard
}import B.Elements exposing (image, imageModifiers)
myImage : Html msg
myImage =
image imageModifiers
[]
[ img [ src "http://i.imgur.com/LcvP04R.gif" ] []
]
myCardImage : Html msg
myCardImage =
cardImage [] [ myImage ]type Msg
= ToggleMenu
myDropdownTrigger : Html Msg
myDropdownTrigger =
dropdownTrigger []
[ button buttonModifiers
[ onClick ToggleMenu
, attribute "aria-haspopup" "true"
, attribute "aria-controls" "dropdown-menu"
]
[ text "Toggle Me"
]
]
myDropdownMenu : Html Msg
myDropdownMenu =
dropdownMenu []
[]
[ dropdownItem False [] [ text "Cool Birds" ]
, dropdownDivider [] []
, dropdownItemLink False [ href "#duck" ] [ text "Duck" ]
, dropdownItemLink False [ href "#duck" ] [ text "Duck" ]
, dropdownItemLink True [ href "#goose" ] [ text "Goose" ]
]
myDropdown : Bool -> Html Msg
myDropdown isMenuOpen =
dropdown isMenuOpen
dropdownModifiers
[]
[ myDropdownTrigger
, myDropdownMenu
]A hoverable variant of dropdown.
The container for the button/link that activates the dropdown menu.
The container for the dropdown's items.
The first attributes list is for the outer div.dropdown-menu. The inner list is for the dropdown-content.
A synonym for div.dropdown-item.is-active.
A synonym for a.dropdown-item.is-active.
An empty hr.dropdown-divider element.
myMessage : Html msg
myMessage =
message myMessageModifiers
[]
[ messageHeader []
[ p [] [ text "hello" ]
]
, messageBody []
[ text "lorem ipsum"
]
]myModal : Html msg
myModal =
modal True
[]
[ modalBackground [] []
, modalContent []
[ text "Anything can go here!"
]
, modalClose Large [] []
]type Msg
= CloseModal
myModal : Html Msg
myModal =
easyModal True
[]
CloseModal
[ text "Your content goes here."
]myPagination : Html msg
myPagination
= pagination Left []
[ paginationPrev [] [ text "Previous" ]
, paginationNext [] [ text "Next" ]
, paginationList []
[ paginationLink False [] [ text "1" ]
, paginationEllipsis [] [ ]
, paginationLink False [] [ text "45" ]
, paginationLink True [] [ text "46" ]
, paginationLink False [] [ text "47" ]
, paginationEllipsis [] [ ]
, paginationLink False [] [ text "83" ]
]A rounded variant of pagination.
myPanel : Html msg
myPanel =
panel []
[ panelHeading [] [ text "Repositories" ]
, panelBlock False
[]
[ controlInput controlInputModifiers [] [] []
]
, panelTabs []
[ panelTab False [] [ text "all" ]
, panelTab True [] [ text "public" ]
, panelTab True [] [ text "private" ]
]
, panelLink False [] [ text "bulma" ]
, panelLink False [] [ text "marksheet" ]
, panelLink True [] [ text "test" ]
, panelLink False [] [ text "horsin" ]
]myPanelBlockAttrs : List (Attribute msg)
myPanelBlockAttrs =
[]
myPanelIconAttrs : List (Attribute msg)
myPanelIconAttrs =
[]
myPanelLink : Html msg
myPanelLink =
panelLinkWithIcon False
myPanelBlockAttrs
myPanelIconAttrs
[ B.Elements.Icon.book ]
[ text "github.com/evancz" ]myPanelBlockAttrs : List (Attribute msg)
myPanelBlockAttrs =
[]
myPanelCheckboxInputAttrs : List (Attribute msg)
myPanelCheckboxInputAttrs =
[ onClick ToggleThing ]
myPanelLink : Html msg
myPanelLink =
panelLinkWithIcon False
myPanelBlockAttrs
myPanelCheckboxInputAttrs
[ text "Remember Me" ]myTabs : Html msg
myTabs =
tabs myTabsModifiers
[]
[]
[ tab False [] [] [ text "Pictures" ]
, tab False [] [] [ text "Music" ]
, tab True [] [] [ text "Videos" ]
, tab False [] [] [ text "Docs" ]
]