
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@tapstack/siteio-react-sdk
Advanced tools
SDK for rendering SiteIO projects in external Next.js applications
SDK for rendering SiteIO projects in external Next.js applications.
npm install @tapstack/siteio-react-sdk
# or
pnpm add @tapstack/siteio-react-sdk
# or
yarn add @tapstack/siteio-react-sdk
The SDK now fetches the exact Tailwind CSS that was generated in the Reweb builder and injects it into your page during SSR together with the project theme variables. That means you no longer need to configure Tailwind CSS in the consuming project—drop in the component and it renders with the same styles that you defined in the builder.
If you want to merge SiteIO CSS with your own Tailwind pipeline (for example to tree-shake utilities or share classes across the rest of your app), you can still follow the optional instructions in TAILWIND_SETUP.md.
import { RewebProject } from "@tapstack/siteio-react-sdk";
export default function Page() {
return (
<RewebProject
projectId="your-project-public-id"
token="your-project-token"
/>
);
}
import { RewebProject } from "@tapstack/siteio-react-sdk";
export default function Page() {
return (
<RewebProject
projectId="your-project-public-id"
token="your-project-token"
initialPageId="page-public-id" // Optional: specific page to render
config={{
apiUrl: "https://your-reweb-instance.com", // Optional: defaults to current origin
}}
className="my-custom-class" // Optional: custom className
componentRegistry={{
// Optional: Map component names to your React components
Button: MyButton,
Card: MyCard,
}}
/>
);
}
Note: This SDK is SSR-only (Server-Side Rendering). It works entirely on the server with no client-side JavaScript required.
If you need more control, you can use PreviewBlockRenderer directly:
import { fetchProject, PreviewBlockRenderer } from "@tapstack/siteio-react-sdk";
export default async function CustomPage() {
const data = await fetchProject({
projectId: "your-project-public-id",
token: "your-project-token",
});
const page = data.pages[0];
return (
<div>
{page.blocks.map((block) => (
<PreviewBlockRenderer
key={block.id}
block={block}
components={data.components}
/>
))}
</div>
);
}
RewebProjectMain component for rendering a Reweb project.
projectId (string, required): The public ID of the projecttoken (string, required): The project token for authenticationinitialPageId (string, optional): The public ID of the page to render initially. Defaults to the home page (/)config (RewebSDKConfig, optional): Configuration options
apiUrl (string, optional): Base URL for the Reweb API. Defaults to current originclassName (string, optional): Custom CSS class namecomponentRegistry (ComponentRegistry, optional): Map of component names to React components (e.g., { Button: MyButton })PreviewBlockRendererLow-level component for rendering individual blocks.
block (Block, required): The block to rendercomponents (Component[], optional): Array of components available for renderingcurrentComponent (CurrentComponent, optional): Current component contextreplaceVhClasses (boolean, optional): Whether to replace vh classes with px. Default: falseclassName (string, optional): Custom CSS class namecomponentRegistry (ComponentRegistry, optional): Map of component names to React componentsfetchProjectUtility function for fetching project data.
projectId (string, required): The public ID of the projecttoken (string, required): The project token for authenticationapiUrl (string, optional): Base URL for the Reweb APIPromise that resolves to ProjectData
token propTo test the SDK integration on localhost:3001 (tapni.com):
localhost:3000<RewebProject
projectId="your-project-id"
token="your-token"
config={{
apiUrl: "http://localhost:3000", // Point to your Reweb instance
}}
/>
The SDK is written in TypeScript and includes full type definitions. All types are exported from the main package:
import type {
ProjectData,
Block,
Component,
RewebSDKConfig,
} from "@tapstack/siteio-react-sdk";
To build the SDK package:
cd packages/siteio-react-sdk
pnpm install
pnpm build
To watch for changes during development:
pnpm dev
MIT
FAQs
SDK for rendering SiteIO projects in external Next.js applications
We found that @tapstack/siteio-react-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.