MichaelCombs28/elm-css-bulma/1.0.0

Bulma.Styled.Components

type alias IsActive =
Bool

Breadcrumb

Crumblet

type alias Crumblet msg =
Html msg
IsActive
-> List (Attribute msg)
-> List (Attribute msg)
-> List (Html msg)
-> Crumblet msg

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.

Card

type alias Card msg =
Html msg
card : List (Attribute msg) -> List (CardPartition msg) -> Card msg

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 [] []
        ]

Card Partitions

type alias CardPartition msg =
Html msg

Card Header

cardHeader : List (Attribute msg) -> List (Html msg) -> CardPartition msg

A horizontal bar with a shadow.

myCardHeader : Html msg
myCardHeader =
    cardHeader []
        [ cardTitle []
            [ text "Queen of Hearts"
            ]
        , cardIcon []
            [ icon Standard
                []
                [ heart_o
                ]
            ]
        ]
List (Attribute msg)
-> { title : List (Html msg)
, icon : List (Html msg)
, onClickIcon : msg
}
-> CardPartition msg
type Msg
    = ShowCard


myIcon : Html msg
myIcon =
    icon Standard [] [ diamond ]


myCardHeader : Html Msg
myCardHeader =
    easyCardHeader []
        { title = [ text "4 of Diamonds" ]
        , icon = [ myIcon ]
        , onClickIcon = ShowCard
        }
List (Attribute msg)
-> { title : String
, icon : Icon msg
, onClickIcon : msg
}
-> CardPartition msg

Card Header Item

type alias CardHeaderItem msg =
Html msg
cardTitle : List (Attribute msg) -> List (Html msg) -> CardHeaderItem msg
easyCardTitle : List (Attribute msg) -> String -> CardHeaderItem msg
cardIcon : List (Attribute msg) -> List (Icon msg) -> CardHeaderItem msg

Card Image

cardImage : List (Attribute msg) -> List (Image msg) -> CardPartition msg
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 ]

Card Content

cardContent : List (Attribute msg) -> List (Html msg) -> CardPartition msg
List (Attribute msg)
-> List (CardFooterItem msg)
-> CardPartition msg
myCardFooter : Html msg
myCardFooter =
    cardFooter []
        [ cardFooterItemLink [] [ text "Save" ]
        , cardFooterItemLink [] [ text "Edit" ]
        , cardFooterItemLink [] [ text "Delete" ]
        ]
type alias CardFooterItem msg =
Html msg
cardFooterItem : List (Attribute msg) -> List (Html msg) -> CardFooterItem msg

Dropdown

DropdownModifiers
-> List (Attribute msg)
-> List (DropdownContent msg)
-> Dropdown msg

A hoverable variant of dropdown.

Menu

Message

type alias Message msg =
Html msg
type alias MessageModifiers =
{ color : Color
, size : Size
}
messageModifiers : MessageModifiers
MessageModifiers
-> List (Attribute msg)
-> List (MessagePartition msg)
-> Message msg
myMessage : Html msg
myMessage =
    message myMessageModifiers
        []
        [ messageHeader []
            [ p [] [ text "hello" ]
            ]
        , messageBody []
            [ text "lorem ipsum"
            ]
        ]

Message Partition

type alias MessagePartition msg =
Html msg
messageBody : List (Attribute msg) -> List (Html msg) -> MessagePartition msg
messageHeader : List (Attribute msg) -> List (Html msg) -> MessagePartition msg
List (Attribute msg)
-> msg
-> List (Html msg)
-> MessagePartition msg

Modal

type alias IsModalOpen =
Bool
IsModalOpen
-> List (Attribute msg)
-> msg
-> List (Html msg)
-> Modal msg
type Msg
    = CloseModal


myModal : Html Msg
myModal =
    easyModal True
        []
        CloseModal
        [ text "Your content goes here."
        ]
type alias ModalPartition msg =
Html msg
modalContent : List (Attribute msg) -> List (Html msg) -> ModalPartition msg
modalBackground : List (Attribute msg) -> List (Html msg) -> ModalPartition msg
easyModalBackground : List (Attribute msg) -> msg -> ModalPartition msg
modalClose : Size -> List (Attribute msg) -> List (Html msg) -> ModalPartition msg
easyModalClose : Size -> List (Attribute msg) -> msg -> ModalPartition msg
List (Attribute msg)
-> List (ModalCardPartition msg)
-> ModalPartition msg
type alias ModalCardPartition msg =
Html msg
modalCardBody : List (Attribute msg) -> List (Html msg) -> ModalCardPartition msg
modalCardHead : List (Attribute msg) -> List (Html msg) -> ModalCardPartition msg
modalCardTitle : List (Attribute msg) -> List (Html msg) -> Html msg
modalCardFoot : List (Attribute msg) -> List (Html msg) -> ModalCardPartition msg

Navbar

VerticalAlignment
-> NavbarModifiers
-> List (Attribute msg)
-> List (NavbarSection msg)
-> Navbar msg

A sticky variant of navbar. Remember to change your root <html> tag to <html class="has-navbar-fixed-top"> or <html class="has-navbar-fixed-bottom">.

VerticalDirection
-> List (Attribute msg)
-> NavbarLink msg
-> List (NavbarDropdown msg)
-> NavbarItem msg

A hoverable variant of navbarItemDropdown.

type alias IsBoxed =
Bool

Pagination

HorizontalAlignment
-> List (Attribute msg)
-> List (PaginationPartition msg)
-> Pagination msg

A rounded variant of pagination.

Pagination Partition

type alias PaginationPartition msg =
Html msg
paginationPrev : List (Attribute msg) -> List (Html msg) -> PaginationPartition msg
easyPaginationPrev : List (Attribute msg) -> msg -> String -> PaginationPartition msg
paginationNext : List (Attribute msg) -> List (Html msg) -> PaginationPartition msg
easyPaginationNext : List (Attribute msg) -> msg -> String -> PaginationPartition msg
List (Attribute msg)
-> List (PaginationListItem msg)
-> PaginationPartition msg

Pagination List Item

type alias PaginationListItem msg =
Html msg
type alias IsCurrent =
Bool
paginationEllipsis : List (Attribute msg) -> List (Html msg) -> PaginationListItem msg
easyPaginationEllipsis : List (Attribute msg) -> PaginationListItem msg

Panel

type alias Panel msg =
Html msg
panel : List (Attribute msg) -> List (PanelPartition msg) -> Panel msg
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" ]
        ]

Panel Partition

type alias PanelPartition msg =
Html msg
panelHeading : List (Attribute msg) -> List (Html msg) -> PanelPartition msg
IsActive
-> List (Attribute msg)
-> List (Html msg)
-> PanelPartition msg
IsActive
-> List (Attribute msg)
-> List (Html msg)
-> PanelPartition msg
IsActive
-> List (Attribute msg)
-> List (Attribute msg)
-> List (IconBody msg)
-> List (Html msg)
-> PanelPartition msg
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" ]
IsActive
-> List (Attribute msg)
-> List (Attribute msg)
-> List (Html msg)
-> PanelPartition msg
myPanelBlockAttrs : List (Attribute msg)
myPanelBlockAttrs =
    []


myPanelCheckboxInputAttrs : List (Attribute msg)
myPanelCheckboxInputAttrs =
    [ onClick ToggleThing ]


myPanelLink : Html msg
myPanelLink =
    panelLinkWithIcon False
        myPanelBlockAttrs
        myPanelCheckboxInputAttrs
        [ text "Remember Me" ]
panelTabs : List (Attribute msg) -> List (PanelTab msg) -> PanelPartition msg

Panel Tab

type alias PanelTab msg =
Html msg
panelTab : IsActive -> List (Attribute msg) -> List (Html msg) -> PanelTab msg

Tabs

type alias Tabs msg =
Html msg
type alias TabsModifiers =
{ style : TabsStyle
, alignment : HorizontalAlignment
, size : Size
}
tabsModifiers : TabsModifiers
TabsModifiers
-> List (Attribute msg)
-> List (Attribute msg)
-> List (Tab msg)
-> Tabs msg
myTabs : Html msg
myTabs =
    tabs myTabsModifiers
        []
        []
        [ tab False [] [] [ text "Pictures" ]
        , tab False [] [] [ text "Music" ]
        , tab True [] [] [ text "Videos" ]
        , tab False [] [] [ text "Docs" ]
        ]

Tab

type alias Tab msg =
Html msg
tab :
IsActive
-> List (Attribute msg)
-> List (Attribute msg)
-> List (Html msg)
-> Tab msg