@nukipa/post-renderer-react
v0.2.4
Published
React adapter for @nukipa/post-content — renders Nukipa CMS post bodies and hydrates interactive islands (forms, CTAs, carousels).
Downloads
740
Readme
@nukipa/post-renderer-react
React adapter for @nukipa/post-content. Renders a CMS post body, then
hydrates interactive islands (lead-gen forms, contact forms, CTA click
tracking, basic carousels).
import { PostBody } from '@nukipa/post-renderer-react';
import { createNukipaClient } from '@nukipa/site-sdk';
const client = createNukipaClient({ /* ... */ });
<PostBody
body={post.body}
components={post.components}
sources={post.sources}
postId={post.id}
lang={post.language}
client={client}
/>What it hydrates
| Island | Behaviour |
| ------------------ | -------------------------------------------------------------------- |
| cta | Click-track via client.recordCtaClick. Anchor stays SSR-rendered. |
| form | Mounts <LeadForm> against the form slug. |
| contact-form | Mounts <ContactForm> reading the schema from the DOM. |
| carousel | Prev/next handlers, no autoplay. |
| chart, widget | Not hydrated — placeholder HTML only. Wire per-tenant if needed. |
The CTA anchor is hybrid by design: search engines and no-JS clients
follow the real href; the click-tracker is purely additive on hydration.
Pass client
If client is omitted, interactive islands silently no-op — the static
HTML still renders correctly. Pass client when you want forms to submit
and CTA pings to fire.
Styling
All static blocks use bp-* classes from @nukipa/post-content. Forms
use BEM-ish lead-form__* / contact-form__* classes. Lift the relevant
CSS from apps/public/app/components/BlogArticle.vue (scoped style block)
into your tenant site.
