Grist Widgets

Examples

17 real widgets you can preview live and start a new project from, via the template or the CLI.

Every example below is a real, working widget — not a snippet. Each one is type-checked on every pnpm typecheck:examples run, previewable live in the playground against a real Grist document, and directly startable from either the template or the CLI.

Preview one live

Click any example's name to open it in the playground, against a real Grist document (no setup needed — the playground brings its own).

ExampleDescriptionUse
Attachment galleryThumbnail grid of every attachment in the selected row. Showcases extractGristAttachmentIdsFromCell + useGrist().fetchAttachmentBlob.attachment-gallery
Bulk mark doneBulk table.update with an array of row patches.bulk-mark-done
Declared columnsShows GRIST_OPTIONS column declarations and mappedRecord after the user maps columns.declared-columns
Row editorEdit the selected row in a polished form. Showcases column mappings, write status, and error UI.form-edit
hello-worldhello-world
Mark doneSingle-row write via table.update.mark-done
Reads demolistTables, fetchTableRows, fetchRow, fetchSelectedRecord.reads-demo
REST fetchfetchWithAuth against the Grist REST API.rest-fetch
Safe parsesafeParseGristTableData with per-cell issues.safe-parse
Schema migrationapplyActions with gristAddVisibleColumnAction, gristRenameColumnAction, and gristRemoveColumnAction.schema-migration
Schema previewuseGristSchema with replicaRowMode schema+samples for LLM context.schema-preview
Slice hooksuseGristStatus, useGristSelection, useGristWrites, useGristTheme in separate child components.slice-hooks
Spreadsheet gridSelected Grist section rendered as a fully-synced, editable spreadsheet via react-datasheet-grid, plus a schema toolbar and replica-document export.spreadsheet-grid
Task boardMini Kanban board grouped by Status. Drag a card to update Status; click to focus the row in linked sections.task-board
ThemeRead w.theme from the host document.theme-demo
Widget optionsPersist UI state with setWidgetOption / widgetOptions.widget-options
Table writescreate, update, upsert, destroy via w.table.writes-demo

Start a new project from one

Copy the template, then swap the placeholder for a real example:

npx create-grist-widget use form-edit

use swaps src/App.tsx (and any example-specific files) in place — it only ever touches src/**, and requires a clean git working tree first, so the swap is always a single reviewable diff. See Getting started for the full template flow.

Where to go next

  • Cookbook — the same recipes, with the surrounding "why" explained.
  • Cheat sheet — one-page API reference for daily use.
  • SDK guide — add the SDK to your own Vite or Next.js project.

On this page