CustomerPortalProps
Defined in: src/react-embed.tsx:82
Props for CustomerPortal.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
apiBaseUrl? |
string |
Base URL where the panel API + /config are mounted (e.g. "/billing" or "https://admin.example.com/billing"). Defaults to "" (same origin, relative). |
EntitlementsDashboardProps.apiBaseUrl |
src/react-embed.tsx:43 |
className? |
string |
Extra className on the root wrapper. | EntitlementsDashboardProps.className |
src/react-embed.tsx:66 |
credentials? |
RequestCredentials |
credentials mode for API requests. Defaults to "same-origin". For a cross-origin embed with cookie auth set "include" — and enable cors on the panel so it returns Access-Control-Allow-Credentials. |
EntitlementsDashboardProps.credentials |
src/react-embed.tsx:49 |
fetch? |
FetchLike |
Custom fetch (inject a bearer token / headers, instrument calls). |
EntitlementsDashboardProps.fetch |
src/react-embed.tsx:51 |
logoUrl? |
string |
Navbar logo image URL (replaces the mark + title). Overrides server /config. |
EntitlementsDashboardProps.logoUrl |
src/react-embed.tsx:78 |
queryClient? |
QueryClient |
Bring your own QueryClient; one is created if omitted. | EntitlementsDashboardProps.queryClient |
src/react-embed.tsx:53 |
routerBase? |
string |
Base path for routing: "browser" (e.g. "/admin/billing"). |
EntitlementsDashboardProps.routerBase |
src/react-embed.tsx:76 |
routing? |
EmbedRouting |
How the dashboard routes between views. - "hash" (default) — routes in location.hash; never touches the host’s router. - "browser" — real history paths under routerBase (the host must serve a catch-all). - "memory" — in-memory only; no URL coupling at all (the query string is kept). - a custom wouter location hook. |
EntitlementsDashboardProps.routing |
src/react-embed.tsx:74 |
theme? |
EmbedTheme |
Theme handling. The embed never writes to the host document — it resolves a theme and applies it to its own wrapper (data-theme). - "auto" (default) — the panel’s own system/light/dark switcher (persisted in localStorage). - "inherit" — follow the host page, live: a dark/light class or data-theme on <html> (then <body>), falling back to the OS prefers-color-scheme. The switcher is hidden. - "light" / "dark" — force one theme (switcher hidden). |
EntitlementsDashboardProps.theme |
src/react-embed.tsx:64 |
token |
string |
Portal token (entpt_…) minted server-side with createPortalToken(), sent as Authorization: Bearer on every request. The panel force-scopes every call to the token’s customer. |
- | src/react-embed.tsx:88 |