Comments starters
Examples of Comments on Craft-rendered pages and in front-end frameworks.
Craft-rendered pages
Default
One line of Twig, craft.comments.render(entry), on an ordinary entry page.
Sprig
A Sprig component that swaps between posts, starting each new thread and stopping the old one.
Turbo
Turbo Drive navigation between posts, and Turbo 8’s morphing page refresh keeping the thread drawn.
Datastar
Datastar morphing the page from the server, with the thread left out of the morph until the post changes.
In front-end frameworks
React
Same domainVite and React with <CommentsThread>, a “Verified buyer” badge drawn by a React component, stars for the rating field, and a second page built on useCommentsThread().
Vue
Same domainThe React starter again, in Vite and Vue.
Web Components
Same domainVite and Tailwind with <verbb-comments>, styled through the stable class names with Comments in its own CSS layer, and a dark mode toggle.
Next.js
Another site, member tokensThe App Router on another domain, signing members in with member tokens minted by a route handler, with the count and structured data rendered on the server.
Nuxt
Subdomain, shared cookieNuxt on a subdomain of the Craft site, sharing Craft’s session cookie through credentialed CORS.