Skip to content

CRM

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.

On this page
Used for
  • 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[]
Defaulta fictional set
The rows of the table. Each carries the company details the enrichment panel compares against.
deals / stages
Deal[] / PipelineStage[]
Defaulta fictional pipeline
The board of the Deals page.
members
CrmMember[]
Defaulta 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>
Defaulta stand-in
Asks a model why a lead scores what it does.
onDraftEmail / onSendEmail
(contact, request, signal) => Promise<DraftResult> / (contact, email) => Promise<void>
Defaultstand-ins
Writes the reply and sends it once the person approves.
onEnrich
(contact, signal) => Promise<EnrichmentField[]>
Defaulta 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
Defaultin 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
Defaultfalse
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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 05Leaves a slot under the enrichment panel for your own cards.
  6. 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

Works with

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

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.

Need help?

Stuck on CRM, or found something off? We read every message.