Ballmac UI home

Memory Panel

New

What an assistant remembers, in sentences a person can read: grouped, searchable, editable in place, pinnable and forgettable with Undo. A master switch stops replies using memory without deleting it.

v1.0.1Updated Oct 25, 2026Ships with a test
What changed
  1. 1.0.1 Oct 25, 2026When memory is off, the notes keep full contrast and are marked with dashed outlines instead of fading.
  2. 1.0.0 Oct 25, 2026First release.

Update without losing your edits

Memory6

Replies use these notes. Edit or forget anything that is wrong.

About you2

Who you are and how you like to work.

  • Is the founder of a two-person design studio in Lisbon.

    PinnedChat on Oct 3

  • Prefers metric units and 24-hour times.

    Said in settings

Your work2

Projects, tools and decisions.

  • Is migrating the client portal from Pages Router to the App Router.

    Chat on Oct 19

  • Deploys on Cloudflare Workers, not Vercel.

    Chat on Oct 21

Style2

Tone, format and length.

  • Wants short answers with the code first and the explanation after.

    PinnedChat on Sep 28

  • Dislikes emoji in replies.

    Chat on Oct 8

Installation

$ pnpm dlx shadcn@latest add @ballmac/memory-panel

Usage

import { MemoryPanel } from "@/components/ballmac/memory-panel"

The full example is in the Code tab above.

Examples

Nothing yet

Memory0

Replies use these notes. Edit or forget anything that is wrong.

Nothing remembered yet. It learns as you talk, and you decide what stays.

API reference

PropTypeDefault
memories*

The starting memories. The panel keeps its own copy and reports every change.

MemoryItem[]—
scopes

The groups, in order.

MemoryScope[]DEFAULT_SCOPES
titlestring—
enabled

Whether memory is used in replies. Controlled.

boolean—
defaultEnabledbooleantrue
onEnabledChange(enabled: boolean) => void | Promise<void>—
onUpdate

Called with the new text. Reject and the old text comes back with the reason.

(id: string, text: string) => void | Promise<void>—
onForget

Called once the undo window has passed. Reject and the memory comes back with the reason.

(id: string) => void | Promise<void>—
onPin(id: string, pinned: boolean) => void | Promise<void>—
onAdd

Adds the "Remember something" form. Return an id to use for the new memory.

(text: string, scope: string) => string | void | Promise<string | void>—
undoMs

How long Undo is offered after Forget, in milliseconds.

number5000

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Switchrole=switch named 'Use memory in replies', with the effect described under it
SearchA labelled search box; the list narrows as you type
RowsPin, Edit and Forget are buttons whose names include the memory text
EditEnter saves, Shift+Enter adds a line, Escape cancels; focus moves into the box
ForgetShows an Undo button for the whole window; every result is announced and failures are alerts

Use with AI

memories is [{ id, text, scope, source?, pinned? }]; scopes is [{ id, label, description? }] (default About you, Your work, Style). The panel keeps its own copy and calls onUpdate(id, text), onForget(id) (after undoMs, default 5000, so Undo works), onPin(id, pinned), onEnabledChange(enabled) and onAdd(text, scope) (adds the form). Handlers may be async; a rejection takes the change back and says why. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Memory Panel (@ballmac/memory-panel) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • The settings screen where a user manages what an assistant knows about them
  • A side panel in a chat that shows which memories a reply used

Not for

  • Conversation history; use a list of chats
  • What a run did; use trace-waterfall

Registry JSON: https://ui.ballmac.com/r/memory-panel.json

Credits

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.