Skip to content
Documentation navigation
Setup

AI

Markdown

Zero-dependency markdown subset with stream throttling for assistant text.

Summary

  • Mint chip is up 12%
  • Check inventory before promos

Docs

Installation

Every AI component page installs the same aggregate @constructive/ai entry. Examples use the default @/components/ui alias; use your configured ui alias if it differs.

components.json
{
  "registries": {
    "@constructive": "https://constructive-io.github.io/blocks/r/{name}.json"
  }
}
Install aggregate
pnpm dlx shadcn@latest add @constructive/ai

When to use

  • Use Markdown for assistant prose that may stream.
  • Prefer a host marked and DOMPurify pipeline when you need full GFM tables.

Usage

example.tsx
tsx
import { Markdown } from '@/components/ui/ai';

<Markdown streaming={streaming}>{text}</Markdown>

API

Primary props for this surface. The installed source types are the full contract.

API for Markdown.
PropTypeBehavior
childrenstringMarkdown source.
streamingbooleanThrottles re-renders while true.