mbr/elm-chadcn/1.0.0

ChadCn.Badge

Provides a badge component.

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

type Config msg

Describes a badge and its presentation.

type Variant
= Default
| Secondary
| Destructive
| Outline
| Ghost
| Link

Describes badge appearance.

new : List (Html msg) -> Config msg

Creates a default badge with caller-owned content.

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

Adds native attributes to the badge.

Sets the badge appearance.

view : Config msg -> Html msg

Renders a configured badge.