Lemma Notification Bell
lemma/lemma-notification-bellUnverifiedBlock
A notification bell icon button with a badge showing unread count and a popover listing recent notifications with mark-as-read support.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/lemma-work/lemma-platform/main/lemma-typescript/lemma-notification-bell.jsonSource
1"use client"23import * as React from "react"4import { Bell, Check } from "lucide-react"5import { Badge } from "@/components/lemma/ui/badge"6import { Button } from "@/components/lemma/ui/button"7import {8 Popover,9 PopoverContent,10 PopoverTrigger,11} from "@/components/lemma/ui/popover"12import { Separator } from "@/components/lemma/ui/separator"13import { Skeleton } from "@/components/lemma/ui/skeleton"14import { useRecords, useUpdateRecord } from "lemma-sdk/react"15import type { LemmaClient } from "lemma-sdk"16import { cn } from "@/components/lemma/lib/utils"1718export type LemmaNotificationBellAppearance = "default" | "borderless" | "minimal" | "contained"19export type LemmaNotificationBellDensity = "compact" | "comfortable" | "spacious"20export type LemmaNotificationBellRadius = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full"2122export interface LemmaNotificationBellProps {23 client: LemmaClient24 podId?: string25 tableName?: string26 enabled?: boolean27 titleField?: string28 bodyField?: string29 readField?: string30 timestampField?: string31 limit?: number32 appearance?: LemmaNotificationBellAppearance33 density?: LemmaNotificationBellDensity34 radius?: LemmaNotificationBellRadius35 onNotificationClick?: (notification: Record<string, unknown>) => void36 className?: string37}3839type NotificationRecord = Record<string, unknown>4041const RADIUS_MAP: Record<LemmaNotificationBellRadius, 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}5152function bellRadiusClassName(53 radius: LemmaNotificationBellRadius,54 kind: "surface" | "control" | "pill" | "overlay",55): string {56 return RADIUS_MAP[radius]?.[kind] ?? RADIUS_MAP.lg[kind]57}5859// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from lemma
All 20 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Lemma Action Surfacelemma-action-surface | lemma | Blocks | Unverified | 4 deps | |
| Lemma Activity Feedlemma-activity-feed | lemma | Blocks | Unverified | 4 deps · 3 files | |
| Lemma Agent Conversation Experiencelemma-assistant-experience | lemma | Blocks | Unverified | 7 deps · 3 files | |
| Lemma Breadcrumbslemma-breadcrumbs | lemma | Blocks | Unverified | 3 deps | |
| Lemma Commentslemma-comments | lemma | Blocks | Unverified | 4 deps · 3 files | |
| Lemma Detail Panellemma-detail-panel | lemma | Blocks | Unverified | 4 deps · 7 files | |
| Lemma Document Workspacelemma-document-workspace | lemma | Blocks | Unverified | 6 deps | |
| Lemma File Browserlemma-file-browser | lemma | Blocks | Unverified | 4 deps |
