@makerinc/org-embed
v0.1.1
Published
Maker org embed React component
Keywords
Readme
@makerinc/org-embed
React component for embedding a Maker organization profile into any React or Next.js app.
Installation
npm install @makerinc/org-embedUsage
import MakerOrgEmbed from "@makerinc/org-embed";
export default function Page() {
return <MakerOrgEmbed orgId="your-org-id" />;
}With a custom target element
By default the component renders its own container <div>. If you want to render into an existing element, pass its id via targetId:
<div id="my-container" />
<MakerOrgEmbed orgId="your-org-id" targetId="my-container" />Props
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| orgId | string | Yes | Your Maker organization ID |
| targetId | string | No | ID of an existing DOM element to render into. If omitted, a container <div> is created automatically with id mkr-org-embed-{orgId} |
Requirements
- React 17 or later
- Next.js App Router: add
"use client"to any parent component if you are not already in a client boundary
License
MIT
