BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/lemma/lemma-user-menu

Lemma User Menu

lemma/lemma-user-menu
FreeBlock

A user avatar with initials fallback and dropdown menu for app headers, showing user info, configurable menu items, online indicator, and sign-out action.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/lemma-work/lemma-platform/main/lemma-typescript/public/r/lemma-user-menu.json

Source

registry/default/lemma-user-menu/components/lemma-user-menu.tsxraw.githubusercontent.com/lemma-work/lemma-platform/main/lemma-typescript/public/r/lemma-user-menu.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { LogOut, User, ChevronDown } from "lucide-react"
5import {
6 DropdownMenu,
7 DropdownMenuContent,
8 DropdownMenuGroup,
9 DropdownMenuItem,
10 DropdownMenuLabel,
11 DropdownMenuSeparator,
12 DropdownMenuTrigger,
13} from "@/components/lemma/ui/dropdown-menu"
14import { cn } from "@/components/lemma/lib/utils"
15
16export type LemmaUserMenuAppearance = "default" | "borderless" | "minimal" | "contained"
17export type LemmaUserMenuDensity = "compact" | "comfortable" | "spacious"
18export type LemmaUserMenuRadius = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full"
19
20export interface LemmaUserMenuItem {
21 label: string
22 href?: string
23 onClick?: () => void
24 icon?: React.ReactNode
25 variant?: "default" | "destructive"
26}
27
28export interface LemmaUserMenuProps {
29 userName?: string
30 userEmail?: string
31 userAvatarUrl?: string
32 isOnline?: boolean
33 menuItems?: LemmaUserMenuItem[]
34 onSignOut?: () => void
35 appearance?: LemmaUserMenuAppearance
36 density?: LemmaUserMenuDensity
37 radius?: LemmaUserMenuRadius
38 className?: string
39}
40
41const RADIUS_MAP: Record<LemmaUserMenuRadius, Record<string, string>> = {
42 none: { surface: "rounded-none", control: "rounded-none", pill: "rounded-none", overlay: "rounded-none" },
43 sm: { surface: "rounded-sm", control: "rounded-sm", pill: "rounded-full", overlay: "rounded-sm" },
44 md: { surface: "rounded-md", control: "rounded-md", pill: "rounded-full", overlay: "rounded-md" },
45 lg: { surface: "rounded-lg", control: "rounded-md", pill: "rounded-full", overlay: "rounded-lg" },
46 xl: { surface: "rounded-xl", control: "rounded-lg", pill: "rounded-full", overlay: "rounded-xl" },
47 "2xl": { surface: "rounded-2xl", control: "rounded-xl", pill: "rounded-full", overlay: "rounded-2xl" },
48 "3xl": { surface: "rounded-3xl", control: "rounded-2xl", pill: "rounded-full", overlay: "rounded-3xl" },
49 full: { surface: "rounded-3xl", control: "rounded-full", pill: "rounded-full", overlay: "rounded-3xl" },
50}
51
52function userMenuRadiusClassName(
53 radius: LemmaUserMenuRadius,
54 kind: "surface" | "control" | "pill" | "overlay",
55): string {
56 return RADIUS_MAP[radius]?.[kind] ?? RADIUS_MAP.lg[kind]
57}
58
59function triggerVariant(appearance: LemmaUserMenuAppearance) {
60 return appearance === "minimal" || appearance === "borderless" ? "ghost" : "outline"
61}
62
63function avatarShellClassName(appearance: LemmaUserMenuAppearance) {
64 return cn(
65// … truncated

What it pulls in

npm packages

  • lucide-react
  • clsx
  • tailwind-merge

Other registry items

  • lemma-ui

Files it writes

  • registry/default/lemma-user-menu/components/lemma-user-menu.tsx

Facts

Registry
lemma
Type
registry:block
Access
Free
Files written
1
Licence
AGPL-3.0
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

lemma.work lemma-work/lemma-platform on GitHub Raw registry item This item as JSON

More from lemma

All 20 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Lemma Action Surfacelemma-action-surfacelemmaBlocksFree4 deps
Lemma Activity Feedlemma-activity-feedlemmaBlocksFree4 deps · 3 files
Lemma Agent Conversation Experiencelemma-assistant-experiencelemmaBlocksFree7 deps · 3 files
Lemma Breadcrumbslemma-breadcrumbslemmaBlocksFree3 deps
Lemma Commentslemma-commentslemmaBlocksFree4 deps · 3 files
Lemma Detail Panellemma-detail-panellemmaBlocksFree4 deps · 7 files
Lemma Document Workspacelemma-document-workspacelemmaBlocksFree6 deps
Lemma File Browserlemma-file-browserlemmaBlocksFree4 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex