Builtin component

Notebook

Full notebook with markdown and code blocks.

Props

PropTypeDefaultDescription
titlestring—Notebook title
descriptionstring—Subtitle
blocksNotebookBlock[]—Content blocks
notebooks{ id, title }[]—Notebook list sidebar
openTabs{ id, title }[]—Open tab indicators
metadata{ environment?, location?, updatedAt?, lastViewedAt? }—Metadata display
actions{ save?, create?, delete?, duplicate?, import?, close?, select? }—Lifecycle actions

Example

Notebook({
  title: "Analysis",
  blocks: [
    { id: "b1", kind: "markdown", content: "# Revenue Analysis" },
    { id: "b2", kind: "code", language: "sql", content: "SELECT 1", action: run() },
  ],
  actions: { save: saveNotebook(), create: createNotebook() },
})