Skip to main content
A block is a card your app places inside a post, reply or direct message. It can show live data, collect votes, run actions and update in place for everyone in the conversation. Members insert blocks from the slash menu, agents insert them as tools, and your app inserts them from events, message actions or the API. Using Effect? See Blocks and references in the Effect guide. You describe a block with three things:

Define a block

This is the block npm create reintersect scaffolds, shown with Zod:
src/taskBlock.tsx
Then add it to your app with .addBlock(TaskBlock). addBlock rejects a block without a view, so call .render() first. Every view follows the same anatomy: a Header, the body, one Actions row and an optional Footer, in that order. The view says what each part is, and Reintersect decides the spacing, which button is primary, the colours and how the block adapts to narrow widths. The task’s one button is primary because it’s the first in Actions. See What Reintersect decides.

Options

Schemas are any Standard Schema that also implements Standard JSON Schema: Zod 4, ArkType and Valibot (through toStandardJsonSchema). The Effect entry takes Effect Schema. See Composing an app.

The render function

render receives the block’s props and a context object, and returns JSX. It can be async and fetch live data:
src/deploymentCard.tsx
One render is shared by every viewer. The context has no viewer, so a render can’t show different content to different people. To hide parts of a block from some viewers, use audience; to collect a choice from each viewer, use viewer inputs, whose counts Reintersect shows without a re-render.

When Reintersect renders

Reintersect calls your render function, validates and stores the resulting tree, and serves that stored tree to viewers. It renders again when:
  • The block is inserted, pasted or cloned.
  • An action returns. The SDK renders with the new state and returns both in the same response.
  • Your app pushes new state or asks for a revalidation through the API.
  • Someone views the block after staleAfter has passed.
Viewers never wait on your server to see a block. If a render fails or times out, Reintersect keeps the last good tree. See Rendering.

Where blocks come from

Blocks inserted through the API land only in circles your app can reach. See Install and consent.

The summary

Block requires a summary of at most 280 characters of plain text. Reintersect uses it wherever the full block can’t appear: notification text, Slack peers of a connected circle, search results and the agent’s fallback text for the block. Write it as a sentence a teammate could read on its own:

Attribution

Every block shows a footer line with your app’s icon and “via <app name>”. Blocks from a development install also show a “Dev” label. You control the header, but you can’t remove or restyle the attribution line.

Next steps

State and actions

Define actions, bind them to buttons and return the next state.

Viewer inputs

Votes and choices stored per member, with live tallies.