Article comes with Pro. Its preview shows once you unlock it.
Usage
import { BlogArticle } from './BlogArticle.jsx'
// It reads its scroll from the nearest scrolling box, so it works in the page or in a panel.
<BlogArticle
locale="en"
article={post} // { topic, title, dek, date: '2026-11-24', minutes, author: { name }, sections: [{ id, heading, body: [...], quote? }] }
likes={post.likes}
liked={visitor.liked.includes(post.id)}
url={'https://example.com/posts/' + post.slug}
onLike={(liked) => fetch('/api/likes', { method: 'POST', body: JSON.stringify({ id: post.id, liked }) })}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text, the date and the sample essay. |
article | { topic, title, dek?, cover?, date, minutes, author: { name }, sections: Array<{ id, heading, body: string[], quote? }> } | null | sample essay | The essay. Its headings make the contents; cover is an image URL (a drawn pot without one); null or no sections shows the empty state. |
likes / liked / onLike | number / boolean / (liked) => void | 214 / false | The like count, whether this visitor liked it, and the call when they change it. |
url / onCopy | string / (url) => void | the page address | The link the copy button puts on the clipboard, and the call after it was copied. |
loading / error / onRetry | boolean / boolean | string / () => void | false | Shows the skeleton, or the error banner with a retry; a string replaces its sentence. |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
Add it to your project
Pro includes the full source of this block. Copy its prompt to install it with your coding agent.
BlogArticle.jsxblog-article.csscopy.jskit.jsxkit.cssui/base-button/ui/copy-button/ui/like-button/ui/avatar-group/ui/empty-state/ui/alert-banner/ui/skeleton-shimmer/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.
