Skip to content

FlagsDashboardProps

Defined in: react.tsx:31

Props for FlagsDashboard.

  • EmbedBaseProps
Property Type Description Overrides Defined in
apiBaseUrl? string Base URL where the panel API + /config are mounted (e.g. "/flags" or "https://admin.example.com/flags"). Defaults to "" (same origin, relative). EmbedBaseProps.apiBaseUrl react.tsx:36
className? string Extra className on the dashboard root wrapper. EmbedBaseProps.className react.tsx:66
credentials? RequestCredentials credentials mode for API requests. Defaults to "same-origin". For a cross-origin embed (panel served from a different origin than this app) with cookie-based auth, set "include" — and enable cors on the panel server so it returns Access-Control-Allow-Credentials. EmbedBaseProps.credentials react.tsx:43
fetch? FetchLike Custom fetch for API requests — inject a bearer token / extra headers, or instrument calls. Defaults to the global fetch. EmbedBaseProps.fetch react.tsx:48
initialEnvironmentKey? string Pre-select an environment on first render (see initialProjectKey). - react.tsx:89
initialProjectKey? string Pre-select a project on first render, overriding the server’s configured default — e.g. an admin panel embedding one dashboard per tenant. The URL still wins when it names one (?project=), so deep links and the in-app switcher behave normally afterwards. - react.tsx:87
logoUrl? string Navbar logo image URL (replaces the title wordmark). Overrides server /config. EmbedBaseProps.logoUrl react.tsx:80
queryClient? QueryClient Bring your own QueryClient; one is created if omitted. EmbedBaseProps.queryClient react.tsx:50
routerBase? string Base path the panel is mounted at, used by routing: "browser" (e.g. "/admin/flags"). EmbedBaseProps.routerBase react.tsx:78
routing? EmbedRouting How the dashboard routes between views/flags. - "hash" (default) — routes in location.hash; never touches the host app’s router or pathname. Safest when mounted inside another app. - "browser" — real history paths (clean URLs). Requires the host to serve the panel’s index.html as a catch-all under routerBase, else refresh 404s. - "memory" — in-memory only; no URL coupling at all. - a custom wouter location hook for full control. EmbedBaseProps.routing react.tsx:76
theme? ThemeMode How the dashboard is themed. Whatever the mode, the whole dashboard (surfaces, text, borders, dialogs, code/diff viewers) resolves to one theme, applied as data-theme on its own wrapper — the host document is never modified. - "auto" (default) — the dashboard’s own system/light/dark switcher (persisted in localStorage). - "inherit" — follow the host page live: a dark/light class or a data-theme (also data-mode/data-color-scheme) attribute or inline color-scheme on <html>, then <body>; the OS prefers-color-scheme only when the host sets none. The switcher is hidden — the host owns it. - "light" / "dark" — fixed; pass your app’s resolved theme to control it directly. The switcher is hidden. EmbedBaseProps.theme react.tsx:64