Skip to content

@xtandard/flags/react

@xtandard/flags/react — embed the admin dashboard as a React component in your own app (advanced mode). Most users mount the bundled SPA via a framework adapter and never touch React; this is for teams that want the panel inside an existing React shell.

import { FlagsDashboard } from "@xtandard/flags/react";
import "@xtandard/flags/react/styles.css";
// Point it at wherever the panel API is mounted:
<FlagsDashboard apiBaseUrl="/flags" />

react and react-dom are peer dependencies in this mode. The component is self-contained otherwise (TanStack Query and styles are bundled).

import { … } from "@xtandard/flags/react";
Name Summary
FlagsDashboardProps Props for FlagsDashboard.
Name Summary
FlagsDashboard The full feature-flag admin dashboard as an embeddable React component.
getThemePref The stored preference (system when unset, invalid, or storage is unavailable).
setApiBase Point the API client at a base URL (used by the @xtandard/flags/react export).
setThemePref Persist pref and notify subscribers.
Name Documented on
default (FlagsDashboard) @xtandard/flags/react