Orasund / elm-card-game / Game.Card

This module contains functions to display cards.

Styles

default : List (Html.Attribute msg) -> List (Html msg) -> Html msg

Displays an default view of a card.

empty : List (Html.Attribute msg) -> String -> Html msg

Display an empty card-sized space with some text

back : List (Html.Attribute msg) -> Html msg -> Html msg

Displays a card with the content centered. Use this to design your card backs.

coin : List (Html.Attribute msg) -> Html msg -> Html msg

Displays a coin.

Parts

element : List (Html.Attribute msg) -> Html msg -> Html msg

Displays a content with a padding

row : List (Html.Attribute msg) -> List (Html msg) -> Html msg

A row on top of the card. It uses flexbox.

fillingImage : List (Html.Attribute msg) -> String -> Html msg

Displays a image that will take up as much space as possible

Attributes

ratio : Basics.Float -> Html.Attribute msg

Defines a aspect-ratio of an element. The ratio is width/height.

backgroundImage : String -> List (Html.Attribute msg)

Sets the background to an image