mbr/elm-chadcn/1.0.0

ChadCn.Bubble

Provides conversation bubble components.

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

= Start
| End

Describes which side contains conversational content.

type Config msg

Describes a bubble and its presentation.

= Top
| Bottom

Describes which edge anchors reactions.

Describes a reaction row and its placement.

type Variant
= Default
| Secondary
| Muted
| Tinted
| Outline
| Ghost
| Destructive

Describes a bubble's visual emphasis.

new : List (Html msg) -> Config msg

Creates a default bubble with caller-owned content.

Sets the bubble alignment.

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

Adds native attributes to the bubble root.

Sets the bubble's visual emphasis.

view : Config msg -> Html msg

Renders a configured bubble.

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

Renders a bubble's visible surface.

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

Renders a bubble surface with a caller-selected element.

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

Renders a group of consecutive bubbles.

newReactions : List (Html msg) -> ReactionsConfig msg

Creates a reaction row anchored to the bottom end of a bubble.

Sets the inline placement of a reaction row.

withReactionAttributes : List (Attribute msg) -> ReactionsConfig msg -> ReactionsConfig msg

Adds native attributes to a reaction row.

Sets the edge anchoring a reaction row.

viewReactions : ReactionsConfig msg -> Html msg

Renders a configured reaction row.