AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

building-react-quill-canvases

Author the React + Quill implementation of a PostHog canvas: the single-component contract, the allowed imports, Quill (PostHog's design system) component and composition rules, theme-aware design tokens, loading skeletons, and the in-canvas date picker. Use after building-canvases has routed a canvas request to a React implementation — dashboards, data boards, forms, tools, or any canvas that should look native to PostHog.

Original source
posthog
License
MIT
Pinned revision
cac7c80a9e5b73484d18eda1bffb47297c938e0c

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read posthog--building-react-quill-canvases at revision cac7c80a9e5b73484d18eda1bffb47297c938e0c, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 4

references/platform-libraries.md

Platform libraries

The canvas builder pins ten optional libraries. Choose the smallest one that matches the job and keep the dependency map returned by canvas-source-retrieve unchanged.

| Library | Use it for | Main capabilities | | ------------------------- | --------------------------- | -------------------------------------------------------------------------------------------- | | d3 | Bespoke data visualization | Scales, shapes, layouts, geographic projections, interpolation, and SVG helpers | | three | 3D and WebGL scenes | Cameras, geometry, materials, lighting, animation, and raycasting | | framer-motion | Coordinated React animation | Enter and exit transitions, layout animation, gestures, springs, and reduced-motion handling | | zod | Runtime data validation | Schemas, parsing, coercion, transformations, unions, and typed validation errors | | @tanstack/react-table | Complex data tables | Sorting, filtering, grouping, pagination, selection, and column state | | @tanstack/react-virtual | Large tables and lists | Windowed rows and columns, dynamic measurements, scrolling, and overscan | | react-hook-form | Multi-field forms | Field registration, validation, dirty state, controlled inputs, and submission state | | lodash-es | Data transformation | Grouping, ordering, deduplication, aggregation, object selection, and collection helpers | | react-markdown | Safe Markdown presentation | Markdown parsing into React elements without dangerouslySetInnerHTML | | papaparse | CSV input and output | CSV parsing, header mapping, type conversion, malformed-row reporting, and CSV generation |

Selection guidance

  • Prefer Recharts for standard charts. Use D3 when the visual needs a layout, projection, or shape that Recharts does not provide.
  • Prefer Quill's Table for small static tables. Use TanStack Table for table behavior and TanStack Virtual when the rendered row count is large. These libraries provide behavior, not visual styles.
  • Use React Hook Form with Quill inputs. Keep the network submit button disabled while submission is active.
  • Use Zod at untrusted boundaries, including declared external API responses and parsed CSV rows.
  • Use lodash-es named imports so the builder can remove unused helpers.
  • React Markdown does not enable raw HTML by default. Do not add plugins or renderers that execute HTML from untrusted content.
  • Papa Parse processes text already available to the canvas. Loading a remote CSV still requires its exact HTTPS origin in capabilities.network.origins (published canvases only — the edit-mode preview blocks direct network access regardless of declaration). The same declaration is required for external stylesheets, images, fonts, media, and frames.
  • Three.js owns its <canvas> element. React can own the surrounding Quill application shell.

The standard imports remain react, react-dom, react-dom/client, @posthog/quill, recharts, lucide-react, and dayjs.