mbr/elm-chadcn/1.0.0

ChadCn.Message

Provides message layout components.

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

= Start
| End

Describes which side of a conversation contains a message.

type Config msg

Describes a message and its presentation.

new : List (Html msg) -> Config msg

Creates a start-aligned message with caller-owned content.

Sets the message alignment.

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

Adds native attributes to the message root.

view : Config msg -> Html msg

Renders a configured message.

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

Renders a message avatar slot.

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

Renders the message body column.

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

Renders a group of consecutive messages.