Document Blocks

Read-only rendering of a document's blocks.

Release notes 2.4

Shared pages load twice as fast, and comments now stay on the sentence they're about.

Workspaces update over the next week. Nothing to do on your side.

What's new

  • Comments anchored to a range of text
  • Inline databases with saved views
  • Table, board and list layouts
  • Faster search across every page

Before you upgrade

Back up custom templates
Tell your team about the new shortcuts
const ready = checks.every((check) => check.passed)

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/blocks

Usage

import type { Block } from "./ui/uicontext/components/kit/Blocks.ts"import { BlocksView } from "./ui/uicontext/components/kit/EditorBlocks.ts"
export const PublishedPage = <M>(h: Html.H<M>, page: { readonly title: string; readonly blocks: ReadonlyArray<Block> }) =>	BlocksView(h, { blocks: page.blocks, label: page.title })

Examples

Toggles, pictures and code

Readers open and close toggles with a click or the keyboard; pictures keep their place while they load; code names its language.

Your first week

Everything you need to ship your first change by Friday.

Get access
Sign in to the workspace with your work email
Ask Priya Nair for the billing project
Run the app locally
bun install
bun run dev --port 5400
The dashboard: a sidebar and a list of projects
The dashboard you'll land on
Stuck for more than an hour? Post in the team channel. Someone will pair with you.

Accessibility

  • Headings are real h2 to h4, code is pre and code, quotes are blockquote, and links are real links.
  • A to-do's box is a disabled checkbox named Done, so screen readers say whether it's checked. Nothing in it is editable or focusable except its links.

Source