Overview

Knit adds posts and a comment section to the website you already have. You write and edit posts right on the page, and readers sign in with a popup and reply without leaving your site. Your content is stored by Knit and served through its API, so there is no CMS or database for you to run.

What you get

  • Posts with a Markdown editor, drafts, images, tags and collections, edited on the page where they appear.
  • Comments with one level of replies, reader profiles, reporting and moderation tools for the site owner.
  • Sign-in for readers through a popup on Knit's domain, so your site never handles passwords.
  • Export of all your posts and comments at any time, as one JSON file in which each post also carries its Markdown with frontmatter.

Three ways to build the UI

@knit/react ships the same features at three levels of control. You can mix them on one site.

LayerImport fromUse it when
Default UI@knit/react/uiYou want it working in minutes. Components such as PostList, PostDetail and CommentSection come with their own styles, which you can adjust with CSS variables and class names.
Primitives and hooks@knit/react/primitives, @knit/reactYou want your own markup. Compound components (PostList.*, Composer.*, PostThread.* and more) and hooks (useKnitPosts, useKnitThread and more) handle data, auth and sanitizing; you write the layout.
shadcn registrynpx shadcn addComing later. Copies the UI source into your project for Tailwind and shadcn/ui sites.

All three use the same data layer, so security fixes and API changes reach every layer through a normal npm update.

Next steps