Skip to main content
MindConfig is passed to MindWidgetProvider (React) or createMindWidget (core). Only authCookieKey is required.
interface MindConfig {
  authCookieKey: string;          // Required — cookie name the SDK reads for its Bearer token

  baseUrl?: string;               // API base URL (defaults to staging)
  lmsContext?: LearningContext;   // Initial learning context
  theme?: ThemeConfig;            // Colors, typography, accessibility
  hooks?: EventHooks;             // Lifecycle callbacks
  permissions?: PermissionModel;  // What data the SDK may access
  nudgeConfig?: NudgeConfig;      // Nudge gating rules
  ui?: MindWidgetUiConfig;        // Custom components, quick actions, className
  debug?: boolean;                // Verbose console logging
}

Options

Name of the cookie the SDK reads to obtain its Bearer auth token. The SDK reads document.cookie for this key on each request and, when present, sends the value as Authorization: Bearer <token>.The host app owns the cookie’s full lifecycle — setting it on login, refreshing it, and clearing it on logout. The SDK never writes to or refreshes this cookie.Empty values throw a ConfigurationError.
baseUrl
string
Overrides the API origin. Must be a valid URL or a ConfigurationError is thrown. See API and environment.
lmsContext
LearningContext
Seeds the context engine with the student’s current page, course, and progress. See Learning context.
theme
ThemeConfig
Colors, typography, and accessibility settings. See Theming.
hooks
EventHooks
Lifecycle callbacks for state changes, nudges, quick actions, and errors. See Events and hooks.
permissions
PermissionModel
What data the SDK may access: canAccessGrades, canAccessPersonalInfo, canAccessCourseData, canSendNotifications.
nudgeConfig
NudgeConfig
Nudge gating rules: enabled, minConfidence, maxPerDay, and quietHours. See Nudges.
ui
MindWidgetUiConfig
Custom per-state components, quick actions, and a root className. See Customizing the UI.
debug
boolean
default:"false"
Logs state transitions, context changes, and HTTP requests to the console.
Config is read once. The widget instance is created a single time per mounted provider. To change core config such as authCookieKey or theme, remount the MindWidgetProvider. Changes to config.lmsContext are re-applied through updateContext while the provider stays mounted.