mbr/elm-chadcn/1.0.0

ChadCn.Card

Provides card components.

The implementation follows the shadcn Base UI structure and Nova defaults.

type Config msg

Describes a card and its presentation.

type Size
= Default
| Small

Controls the spacing and typography of a card.

new : List (Html msg) -> Config msg

Creates a default-sized card with caller-owned content.

withAttributes : List (Attribute msg) -> Config msg -> Config msg

Adds native attributes to the card root.

withSize : Size -> Config msg -> Config msg

Sets the card's spacing and typography size.

view : Config msg -> Html msg

Renders a configured card.

title : List (Attribute msg) -> List (Html msg) -> Html msg

Renders a card title.

description : List (Attribute msg) -> List (Html msg) -> Html msg

Renders supporting card-header text.

action : List (Attribute msg) -> List (Html msg) -> Html msg

Renders content aligned to the top-right of a card header.

content : List (Attribute msg) -> List (Html msg) -> Html msg

Renders the main body of a card.