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-record-form

Lemma Record Form

lemma/lemma-record-form
FreeBlock

A schema-aware record form with searchable FK inputs, enum/type-aware controls, conditional field visibility, and inline/modal/sheet layouts. Supports direct or function-backed submissions.

Install it

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

Source

registry/default/lemma-record-form/components/lemma-record-form.tsxraw.githubusercontent.com/lemma-work/lemma-platform/main/lemma-typescript/public/r/lemma-record-form.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { Loader2 } from "lucide-react"
5import { Button } from "@/components/lemma/ui/button"
6import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/lemma/ui/dialog"
7import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "@/components/lemma/ui/sheet"
8import { Separator } from "@/components/lemma/ui/separator"
9import { useRecordForm } from "lemma-sdk/react"
10import {
11 DEFAULT_RECORD_FORM_HIDDEN_FIELDS,
12 orderRecordSchemaFields,
13 type LemmaClient,
14} from "lemma-sdk"
15import { RecordFormField } from "@/components/lemma/record-form-fields"
16import { cn } from "@/components/lemma/lib/utils"
17
18export type LemmaRecordFormAppearance = "default" | "minimal" | "borderless" | "contained"
19export type LemmaRecordFormSurface = "inherit" | "muted" | "card"
20export type LemmaRecordFormDensity = "compact" | "comfortable" | "spacious"
21export type LemmaRecordFormRadius = "none" | "sm" | "md" | "lg" | "xl"
22export type LemmaRecordFormVisibilityRule<TContext> = boolean | ((context: TContext) => boolean)
23
24export interface LemmaRecordFormFieldVisibilityContext {
25 values: Record<string, unknown>
26 fieldName: string
27}
28
29export interface LemmaRecordFormSectionVisibilityContext {
30 values: Record<string, unknown>
31 label: string
32 fields: string[]
33}
34
35export interface LemmaRecordFormFieldGroup {
36 label: string
37 fields: string[]
38 visible?: LemmaRecordFormVisibilityRule<LemmaRecordFormSectionVisibilityContext>
39}
40
41export interface LemmaRecordFormProps {
42 client: LemmaClient
43 podId?: string
44 tableName: string
45 recordId?: string
46
47 mode?: "inline" | "modal" | "sheet"
48 surface?: LemmaRecordFormSurface
49 appearance?: LemmaRecordFormAppearance
50 density?: LemmaRecordFormDensity
51 radius?: LemmaRecordFormRadius
52 submitVia?: "direct" | "function"
53 submitFunctionName?: string
54 submitFunctionInput?: (payload: Record<string, unknown>) => Record<string, unknown>
55 hiddenFields?: string[]
56 visibleFields?: string[]
57 fieldOrder?: string[]
58 fieldGroups?: LemmaRecordFormFieldGroup[]
59 fieldVisibility?: Record<string, LemmaRecordFormVisibilityRule<LemmaRecordFormFieldVisibilityContext>>
60 sectionVisibility?: Record<string, LemmaRecordFormVisibilityRule<LemmaRecordFormSectionVisibilityContext>>
61 foreignKeyLabels?: Record<string, string>
62
63 initialValues?: Record<string, unknown>
64 onSuccess?: (record: Record<string, unknown>) => void
65 onClose?: () => void
66}
67
68// … truncated

What it pulls in

npm packages

  • lemma-sdk
  • lucide-react

Other registry items

  • lemma-ui

Files it writes

  • registry/default/lemma-record-form/components/record-form-fields.tsx
  • registry/default/lemma-record-form/components/lemma-record-form.tsx

Facts

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

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