UI

Connectors

Inline OAuth connector setup card for AI assistants with Redirecting, Authorizing, and Syncing phases, a 2px progress hairline, rolling tabular sync counts, mid-flight Cancel and Retry, plain-language scope disclosures, and inline Disconnect confirmation.

import { ConnectorSetup } from '@uthereal/ui/connector-setup'

Connector setup playground

Connect your tools

Let Assistant search and act in the apps your team uses.

2 of 8 connected
  • SlackSearch channels and threads, post replies
  • GitHubnorthwind-labs · 342 pull requests
  • NotionSearch pages, docs and databases
  • Google Drivemaya@northwind.co · 5,612 files
  • LinearCreate, triage and update issues
  • JiraTrack tickets across Atlassian projects
  • SalesforceLook up accounts and opportunities
  • HubSpotRead contacts, deals and notes
Loading interactive preview…

Overview

ConnectorSetup renders a Connect your tools card that lets readers grant an AI assistant access to workspace apps without leaving the list. Selecting Connect steps the row inline through Redirecting → Authorizing → Syncing with a 2px progress hairline under the text column, shimmering status text, and a rolling tabular item count. Readers can Cancel at any point in flight or Retry inline if authorization fails (in the built-in simulation, Salesforce requests admin approval on the first attempt and succeeds on Retry).

Once connected, the row swaps to Connected and opens a disclosure listing the connected account, synced count, plain-language capabilities granted to assistantName, and an inline Disconnect confirmation (Remove access? with Keep and Disconnect, where Escape backs out cleanly).

Use ConnectorSetup during assistant onboarding, workspace tool permissions, or side panels where users authorize third-party apps. For managing Model Context Protocol servers with per-tool switches and token context budgets, use MCP. For full cloud integration marketplaces with sync frequency drawers, use Integrations.

Usage

'use client'
import { ConnectorSetup } from '@uthereal/ui/connector-setup'

export function AssistantConnectors() {
  return (
    <ConnectorSetup
      assistantName="Northwind"
      connect={async (connector, { signal, report }) => {
        report({ phase: 'redirecting' })
        const auth = await openOAuthPopup(connector.id, signal)
        report({ phase: 'authorizing' })
        await exchangeOAuthToken(connector.id, auth.code, signal)
        report({ phase: 'syncing', synced: 0 })
        const summary = await triggerInitialSync(connector.id, signal, (n) =>
          report({ synced: n }),
        )
        return {
          account: summary.workspace,
          scopes: summary.grantedScopes,
          synced: summary.count,
        }
      }}
      disconnect={async (connector, { signal }) => {
        await fetch(`/api/connectors/${connector.id}`, {
          method: 'DELETE',
          signal,
        })
      }}
    />
  )
}

Omit connectors, connect, and disconnect to render the default eight-app sample list (Slack, GitHub, Notion, Google Drive, Linear, Jira, Salesforce, HubSpot) with GitHub and Google Drive pre-connected and simulated local OAuth handshakes (nothing leaves the browser).

Examples

Compact non-searchable list

Pass a focused connectors subset, pre-select defaultConnected, set searchable={false}, and pass footer={null} for a tight onboarding or settings card scoped to a single team workflow.

Engineering tools

Let Northwind search and act in the apps your team uses.

2 of 4 connected
  • GitHubnorthwind-labs · 342 pull requests
  • LinearNorthwind · ENG · 486 issues
  • SlackSearch incident channels and post deploy summaries
  • NotionRead architecture RFCs and on-call runbooks

Handshake lifecycle and scopes

Inline connection states

StatusStatus lineRow buttonHairline progress
availableSingle-line description.ConnectHidden.
connectingShimmering Redirecting → Authorizing → Syncing (rolling count).CancelEases to 16% → 40%, then tracks synced / total to 100%.
errorcircle-alert icon and thrown error message.RetryHidden.
connectedaccount · synced noun (or description).ConnectedHidden; row expands granted scopes and Disconnect.

Built-in marks

ConnectorMark is exported from @uthereal/ui/connector-setup and ships crisp 20px icons for slack, github, notion, google-drive, linear, jira, salesforce, and hubspot. Supply renderMark(connector) in React to render custom app marks.

API reference

These serializable arguments and defaults come directly from the component schema.

ArgumentType / defaultDescription
titlestringDefault: "Connect your tools"Card heading and accessible group name.
descriptionstring—Line under the heading. Defaults to a sentence built from assistantName.
assistantNamestringDefault: "Assistant"Name of the assistant woven into the description, the scopes heading, and the footer.
connectorsConnectorItem[]Default: [{"id":"slack","name":"Slack","description":"Search channels and threads, post replies","mark":"slack","host":"slack.com","account":"northwind.slack.com","scopes":["Read messages in public channels","Search message history","Post replies as Assistant"],"sync":{"count":1204,"noun":"messages"},"keywords":["chat","messages"]},{"id":"github","name":"GitHub","description":"Read code, issues and pull requests","mark":"github","host":"github.com","account":"northwind-labs","scopes":["Read code in 12 repositories","Read and write issues","Comment on pull requests"],"sync":{"count":342,"noun":"pull requests"},"keywords":["code","git","repos"]},{"id":"notion","name":"Notion","description":"Search pages, docs and databases","mark":"notion","host":"notion.so","account":"Northwind HQ","scopes":["Read pages shared with Assistant","Search workspace content","Create pages in Drafts"],"sync":{"count":2318,"noun":"pages"},"keywords":["docs","wiki"]},{"id":"google-drive","name":"Google Drive","description":"Find docs, sheets and slides","mark":"google-drive","host":"accounts.google.com","account":"maya@northwind.co","scopes":["View files you open or share","Search file names and content","Export files to PDF"],"sync":{"count":5612,"noun":"files"},"keywords":["docs","sheets","files","google"]},{"id":"linear","name":"Linear","description":"Create, triage and update issues","mark":"linear","host":"linear.app","account":"Northwind · NOR","scopes":["Read issues and projects","Create and update issues","Comment on issues"],"sync":{"count":864,"noun":"issues"},"keywords":["issues","tickets","projects"]},{"id":"jira","name":"Jira","description":"Track tickets across Atlassian projects","mark":"jira","host":"id.atlassian.com","account":"northwind.atlassian.net","scopes":["Read issues in 4 projects","Transition issue status","Add comments and worklogs"],"sync":{"count":1977,"noun":"issues"},"keywords":["atlassian","tickets"]},{"id":"salesforce","name":"Salesforce","description":"Look up accounts and opportunities","mark":"salesforce","host":"login.salesforce.com","account":"Northwind Traders","scopes":["Read accounts and contacts","Read opportunities","Log activity on records"],"sync":{"count":428,"noun":"opportunities"},"keywords":["crm","sales"]},{"id":"hubspot","name":"HubSpot","description":"Read contacts, deals and notes","mark":"hubspot","host":"app.hubspot.com","account":"Portal 24019837","scopes":["Read contacts and companies","Read deals and pipelines","Create notes on records"],"sync":{"count":3140,"noun":"contacts"},"keywords":["crm","marketing"]}]Apps to list. Defaults to eight rich sample apps (Slack, GitHub, Notion, Google Drive, Linear, Jira, Salesforce, HubSpot).
defaultConnectedstring[]—Connector ids connected on first render when uncontrolled. Defaults to GitHub and Google Drive for the samples, none otherwise. Edits do not reset a mounted instance.
searchablebooleanDefault: trueShow the search field. It matches name, description, account, and keywords.
searchPlaceholderstringDefault: "Search apps"Placeholder text inside the search field.
autoPlaybooleanDefault: falsePlay a scripted run once the card scrolls into view: connect Slack, then a Salesforce attempt that needs admin approval and its retry. Opt-in demo behavior; never fires when the host connect callback is wired.
footerstring | null—Footer line under the list. Defaults to a short privacy note built from assistantName; null hides it.
connectActionstring—Registered host action requested when Connect or Retry is pressed on a connector.
disconnectActionstring—Registered host action requested once the inline disconnect confirmation is confirmed.
recipestudio | softDefault: "studio"Visual treatment. Both recipes preserve interaction behavior.
themeConnectorSetupThemeDefault: {}Color mode, accent, and typed semantic token overrides.
motionnone | subtle | expressiveDefault: "subtle"Animation preset. System reduced-motion preferences take precedence.
motionOptionsConnectorSetupMotionOptionsDefault: {}Status swap, progress hairline, and details spring timing overrides in milliseconds.
dirltr | rtl—Reading direction; inherited from the page when omitted.
  • ConnectorItem accepts { id, name, description, mark, host?, account?, scopes?, sync?: { count, noun }, keywords? }.
  • Every id in connectors must be unique, and every ID in defaultConnected must match a listed connector.

React integration

PropPurpose
connectedControlled array of connected connector IDs; pair with onConnectedChange.
onConnectedChange(ids)Called with the updated list of connected IDs whenever a connect or disconnect completes.
connect(connector, context)Runs the real OAuth flow with { signal, report }. Call report({ phase, synced }) as steps advance; throw an Error to surface Retry.
disconnect(connector, context)Revokes access after the inline Disconnect confirmation; receives { signal }.
onConnect(connector, result)Called once a connection finishes with { account, scopes, synced }.
onDisconnect(connector)Called once access is revoked.
onAction(action, connectorId?)Called with connectAction (on Connect/Retry) or disconnectAction (on confirmed Disconnect) and the connector ID.
renderMark(connector)Custom 20px icon slot replacing ConnectorMark inside each row. Keep returned elements decorative.
description / footerAlso accept null in React (description={null} restores the default sentence; footer={null} hides the privacy footer).
presetApplication defaults overridden by explicit instance arguments.
tokensCSS variables applied after the typed theme, forwarded to root and all composed buttons.
ref, className, styleApplied to the root <section> element.
Native attributesid, aria-*, data-*, and remaining <section> props forwarded to the root element.

Keyboard & accessibility

KeyAction
TabMoves across the search field, clear button, row actions (Connect, Cancel, Retry, Connected), and disclosure actions.
Enter / SpaceStarts connecting, cancels an in-flight handshake, retries a failure, toggles details, or confirms Disconnect.
EscapeClears a non-empty search query, or backs out of the inline Remove access? confirmation without closing the disclosure.
  • Compact row buttons display concise labels (Connect, Cancel, Retry, Connected, Disconnect) paired with explicit aria-label names naming the app (for example, "Connect Slack" or "GitHub connected. Show access details").
  • The header connected count and rolling sync count wrap visual animated numerals in aria-hidden="true" and pair them with visually hidden plain text so screen readers hear exact totals.
  • Expanded scope disclosures render as role="region" wired via aria-controls and aria-expanded on the Connected button.
  • A pre-mounted polite role="status" live region announces connection starts, synced totals, cancellations, errors, and disconnects (appending "Simulated, nothing was sent." when connect is omitted).
  • Below 440px container width, the header stacks vertically and horizontal indents tighten cleanly. Logical CSS mirrors in RTL (dir="rtl"), flipping the progress hairline origin to the inline-end edge, and @media (forced-colors: active) maps borders, highlights, and progress fills to system colors.

Motion & theming

Status lines, row buttons, and the inline disconnect confirmation crossfade in fixed grid cells (100ms out, 160ms in with a 2px rise) so rows never jump. The progress hairline eases smoothly through redirecting (16%) and authorizing (40%), then tracks sync progress linearly while digits roll in tabular columns (RollingNumber). Scope disclosures open on a measured spring height.

Under prefers-reduced-motion: reduce, status rise, shimmer, digit rolling, and disclosure height springs turn off while swaps keep a 120ms opacity crossfade and the progress hairline reflects exact phase progress immediately. Setting motion="none" makes every transition immediate (0ms).

theme accepts mode, accent, and typed tokens across these groups:

Token groupCSS custom properties
core--ui-surface, --ui-surface-raised, --ui-text, --ui-text-secondary, --ui-muted, --ui-border, --ui-highlight, --ui-accent, --ui-accent-foreground, --ui-danger, --ui-focus-ring, --ui-radius, --ui-border-width, --ui-shadow, --ui-disabled-opacity, --ui-font, --ui-font-size, --ui-font-weight
extended--ui-surface-sunken, --ui-border-strong, --ui-border-subtle, --ui-track, --ui-info, --ui-success, --ui-warning, --ui-tone-foreground, --ui-overlay, --ui-tint-strength
shape--ui-radius-sm, --ui-popup-radius, --ui-surface-radius
accentTones--ui-accent-strong, --ui-accent-subtle
control--ui-control-height, --ui-control-padding-x, --ui-control-gap, --ui-icon-size
type--ui-font-mono, --ui-font-display

An application-wide UtherealProvider supplies defaults.

Composition

In an agent composition, ConnectorSetup is a leaf block. Write each connector description as one concise sentence and write scopes as plain-language capabilities rather than raw OAuth strings. Keep autoPlay false unless explicitly demonstrating a scripted run. See Building with agents.

{
  "type": "ConnectorSetup",
  "props": {
    "title": "Connect your tools",
    "assistantName": "Assistant",
    "searchable": true,
    "connectAction": "connect_workspace_app",
    "disconnectAction": "disconnect_workspace_app"
  },
  "children": []
}

On this page