Skip to content
English
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

PropTypeDefaultWhat 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? }> } | nullsample essayThe 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 / onLikenumber / boolean / (liked) => void214 / falseThe like count, whether this visitor liked it, and the call when they change it.
url / onCopystring / (url) => voidthe page addressThe link the copy button puts on the clipboard, and the call after it was copied.
loading / error / onRetryboolean / boolean | string / () => voidfalseShows the skeleton, or the error banner with a retry; a string replaces its sentence.
labelsobject—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.