Loading component…
Loading component…
Integrations page of a command menu – search, a list of services and the picked one with its connection on two tiles
To reuse this local React demo, copy all files from the Code tab into the same folder, then import IntegrationPicker from ./integration-picker.
import { IntegrationPicker } from "@/components/ui/integration-picker";
export function Integrations() {
return (
<IntegrationPicker
appName="TavrixUI"
onToggle={(id, connected) => saveIntegration(id, connected)}
onExplore={(id) => router.push(`/integrations/${id}`)}
onBack={() => setPage("root")}
onClose={closeMenu}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| integrations | Integration[] | 10 sample services | Each { id, name, domain, category, description, features, path + color or icon, connected } |
| appName | string | "TavrixUI" | Your product's name in the title, e.g. “TavrixUI + Linear” |
| appIcon | ReactNode | the product mark | Your product's mark on the black tile |
| defaultSelected | string | the first item | Id of the integration that is picked first |
| onToggle | (id: string, connected: boolean) => void | Called when an integration is switched on or off | |
| onExplore | (id: string) => void | Called by “Explore integration” | |
| onBack | () => void | Shows the back button and runs on ← in an empty search | |
| onClose | () => void | Runs on Esc in an empty search | |
| labels | { title?; search?; explore?; connect?; disconnect? } | The words, for pickers that aren't about integrations – e.g. { title: "Tools", search: "Search tools" } to connect tools to an agent | |
| action | "explore" \| "connect" | "explore" | explore: a switch beside the title connects, the button opens onExplore. connect: no switch – the button connects the picked one (dark) or disconnects it |
| className | string | Extra class on the root |
Follows its own width: below 560px the list sits above the details; the illustration and capabilities are left out
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"