mbr/elm-chadcn/1.0.0

ChadCn.Tooltip

Provides a tooltip.

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

type Config msg

Describes tooltip content and its composed trigger.

type Side
= Top
| Right
| Bottom
| Left

Describes tooltip placement relative to its trigger.

new :
String
-> (List (Attribute msg) -> Html msg)
-> List (Html msg)
-> Config msg

Creates a tooltip with a stable identifier and composed trigger.

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

Adds attributes to the tooltip content.

withSide : Side -> Config msg -> Config msg

Sets the tooltip placement.

view : Config msg -> Html msg

Renders a tooltip around its composed trigger.