A small CRM on the App Shell: a contacts table, a deal pipeline and a record page. The record puts the header, the activity timeline and an agent that proposes company details side by side, and nothing is written until you accept it. Every write and every AI call is a function you replace with your own request.
This page holds the props and the code. See the template, its screens and a live preview.
- Small sales CRM
- Account and contact records
- Deal pipeline
- Agent-assisted data entry
- Back office for a sales team
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- contacts
CrmContact[]- Default
a fictional set - The rows of the table. Each carries the company details the enrichment panel compares against.
- deals / stages
Deal[] / PipelineStage[]- Default
a fictional pipeline - The board of the Deals page.
- members
CrmMember[]- Default
a fictional team - The people on the Settings page.
- avatarFor
(name) => string|undefined- A picture for a person. Without it the avatars show initials.
- onExplainScore
(contact, signal) => Promise<ScoreExplanation>- Default
a stand-in - Asks a model why a lead scores what it does.
- onDraftEmail / onSendEmail
(contact, request, signal) => Promise<DraftResult> / (contact, email) => Promise<void>- Default
stand-ins - Writes the reply and sends it once the person approves.
- onEnrich
(contact, signal) => Promise<EnrichmentField[]>- Default
a stand-in - Asks the agent about the company of a record. Pass the signal to your request.
- onApply
(contact, changes) => void|Promise- Writes the accepted enrichment changes.
- onAddNote
(contact, text) => void|Promise- Saves a note typed in the timeline.
- recordAside
(contact) => ReactNode- More cards in the side column of a record, under the enrichment panel.
- importAdapter
ImportAdapter- Default
in memory - What the Import button on Contacts writes through. It opens the Import Wizard; on Done the new contacts are highlighted at the top.
- layout
"page"|"fill"- Default
"page" - page: the window scrolls and the sidebar and topbar stick. fill: the page fills its parent and the main column scrolls.
- embedded
boolean- Default
false - For a page shown inside another page: no second main or aside landmark.
- labelPrefix
string- Prefixes the shell's landmark names so several previews on one page stay unique.
| Prop | Type | Default | Description |
|---|---|---|---|
| contacts | CrmContact[] | a fictional set | The rows of the table. Each carries the company details the enrichment panel compares against. |
| deals / stages | Deal[] / PipelineStage[] | a fictional pipeline | The board of the Deals page. |
| members | CrmMember[] | a fictional team | The people on the Settings page. |
| avatarFor | (name) => string | undefined | - | A picture for a person. Without it the avatars show initials. |
| onExplainScore | (contact, signal) => Promise<ScoreExplanation> | a stand-in | Asks a model why a lead scores what it does. |
| onDraftEmail / onSendEmail | (contact, request, signal) => Promise<DraftResult> / (contact, email) => Promise<void> | stand-ins | Writes the reply and sends it once the person approves. |
| onEnrich | (contact, signal) => Promise<EnrichmentField[]> | a stand-in | Asks the agent about the company of a record. Pass the signal to your request. |
| onApply | (contact, changes) => void | Promise | - | Writes the accepted enrichment changes. |
| onAddNote | (contact, text) => void | Promise | - | Saves a note typed in the timeline. |
| recordAside | (contact) => ReactNode | - | More cards in the side column of a record, under the enrichment panel. |
| importAdapter | ImportAdapter | in memory | What the Import button on Contacts writes through. It opens the Import Wizard; on Done the new contacts are highlighted at the top. |
| layout | "page" | "fill" | "page" | page: the window scrolls and the sidebar and topbar stick. fill: the page fills its parent and the main column scrolls. |
| embedded | boolean | false | For a page shown inside another page: no second main or aside landmark. |
| labelPrefix | string | - | Prefixes the shell's landmark names so several previews on one page stay unique. |
What it handles
- 01Lays out a CRM on the App Shell: a sidebar with Contacts and Deals, a contacts table with search and sort, a pipeline board and a record page.
- 02Opens a record from a table row: the header with the stage, owner, tags and quick actions, the activity timeline with a note field, and a side column.
- 03Lets an agent propose company details with a source and a confidence for each and writes only what you accept, scores the lead with the reasons behind it, and drafts a reply you approve before it is sent.
- 04Moves deals between stages by drag or by keyboard, with the stage totals and the weighted value kept up to date, and keeps a Settings page with the workspace, its members and the stages.
- 05Leaves a slot under the enrichment panel for your own cards.
- 06Fetches nothing: every write and every AI call is a function you replace with your own request.
States
- First render
- Nothing moves; the table paints as it is
- none
- Open a record
- The record replaces the table at once
- none
- Agent runs
- The loader shows the search, then the proposals appear
- 120ms, ease out
- Move a deal
- The card glides to its slot and the totals count to their new values
- 180ms, ease out
- Reduced motion
- Everything changes at once
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing moves; the table paints as it is | none |
| Open a record | The record replaces the table at once | none |
| Agent runs | The loader shows the search, then the proposals appear | 120ms, ease out |
| Move a deal | The card glides to its slot and the totals count to their new values | 180ms, ease out |
| Reduced motion | Everything changes at once | 0ms |
Works with
- App ShellThe frame around every page: sidebar, topbar and breadcrumb.
- Data TableThe contacts list.
- Record HeaderThe top of a record.
- Record TimelineThe activity of a record.
- Deal PipelineThe Deals page.
- Enrichment PanelThe agent's proposals on a record.
- Lead ScoreThe score and its reasons, top of the side column.
- AI Email DraftThe reply an agent drafts, above the timeline.
When to use
When to use
- A small CRM: a contacts table, a deal pipeline and a record page with its timeline and an agent that proposes company details.
- A starting point for a sales tool where every write and every AI call is your own endpoint.
When not to use
- A signed-in home screen with agents: use App Dashboard.
- Just the pipeline board: use Deal Pipeline.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI CRM to my app and wire it to my own data.
- I need a small CRM: a contacts table, a deal pipeline and a record page with its timeline and an agent that proposes company details. Set that up with the Knowns UI CRM.
- Which CRM props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "template-crm" }) and search_docs({ query: "crm" }). Pro props, full examples and source come back once your license key is in the MCP config.