React component
<Comments /> is a client component. Pass the signed-in person as user and the record as scope. There is no viewerId prop. The adapter's viewerId argument is filled from user.id.
Props
user:{ id, name?, avatarUrl? }.idmax 200.namemax 120. Names are cosmetic. The id is the actor. There is no email field.scope:{ tenantKey, resourceType, resourceId }. Each field max 200. A single-tenant app still sends a stabletenantKey.appId: publishedcma_id. Local mode usescma_localwhen omitted.publishableKey:bsw_test_pub_…orbsw_live_pub_…. Together withappIdand noadapter, this selects Hosted.apiBaseUrl: defaults tohttps://comments.bootstrapware.co.adapter: aCommentsAdapter. Wins over Hosted and local.authorToken:bsw_cmauth_v1.token from your server. The widget never mints one.renewAuthorToken:() => Promise<string>. Called when unverifiedexpis under 60 seconds away, and again on an expired token, at most once every 30 seconds.permissions: button visibility when no token is present. A token'spermsreplace this list. It is not a grant. The local adapter still refusesmoderatewithout a token.searchMentionCandidatesandresolveUsers: host callbacks in every mode.theme:"light"or"dark". Omit it and the shell stays the light cream default. v1 does not followprefers-color-scheme.pageSize: default 50, maximum 100.dirisltrorrtl.classNameis layout only.
Resolve order
Explicit adapter, then Hosted when both appId and publishableKey are set, otherwise a memory-only local adapter. Pass createLocalAdapter({ storageKey }) when you want localStorage.
Switching user, tenant, or resource cancels in-flight requests, drops caches, closes the stream, and keeps a separate composer draft. A response for a previous tuple is ignored.
Theme tokens on .bsw-cm, or .bsw-cm[data-theme="dark"] when theme="dark": --bsw-cm-bg, --bsw-cm-panel, --bsw-cm-fg, --bsw-cm-muted, --bsw-cm-line, --bsw-cm-accent, --bsw-cm-accent-fg, --bsw-cm-radius. Published branding.primaryColor sets --bsw-cm-accent.
Full install paths: React guide.
Related: Adapter · Host themes · Modes