mljr-ui · showcase

User Menu

Composite: clickable Avatar opens a dropdown with identity header + action items. Composed from primitive.Avatar + custom Datastar dropdown.

special user-menu

Usage

// import "mljr-web/ui/special"
special.UserMenu(special.UserMenuProps{
    Name:     "Jane Smith",
    Email:    "jane@example.com",
    Initials: "JS",
    Signal:   "_um1",
    Items: []special.UserMenuItem{
        {Label: "Profile", Icon: "lucide:user",     Href: "/profile"},
        {Label: "Settings", Icon: "lucide:settings", Href: "/settings"},
        {Divider: true},
        {Label: "Sign out", Icon: "lucide:log-out",  Danger: true, OnClick: "alert('bye')"},
    },
})