Reusable integration connection picker component.
Displays integration connections as clickable cards in a modal or inline grid. Supports single and multi-select modes, search, and provider filtering.
Examples
<%-- Single select, one provider --%>
<.integration_picker
id="google-picker"
connections={@all_connections}
selected={[@selected_uuid]}
provider="google"
on_select="select_integration"
/>
<%-- Multi-select, all providers, with search --%>
<.integration_picker
id="multi-picker"
connections={@all_connections}
selected={@selected_uuids}
multiple={true}
searchable={true}
on_select="update_integrations"
/>
<%-- Single select, all providers --%>
<.integration_picker
id="any-picker"
connections={@all_connections}
selected={[@selected_uuid]}
on_select="pick_integration"
/>The parent LiveView is responsible for loading connections via
PhoenixKit.Integrations.list_connections/1 or building the list
from PhoenixKit.Integrations.Providers.all/0.
Events
The component sends the on_select event with:
Single mode:
%{"uuid" => uuid, "action" => "select" | "deselect"}— clicking an unselected card emits"select"; clicking the currently-selected card emits"deselect"so the parent can clear the binding.Multi mode:
%{"uuid" => uuid, "action" => "add" | "remove"}when toggled
Search
Search is handled client-side via the IntegrationPickerSearch JS hook.
Cards are filtered by their data-search-text attribute (name, account, provider).
No parent LiveView handler is needed — filtering is instant and local.
Summary
Functions
Renders an integration picker as a grid of cards.
Functions
Renders an integration picker as a grid of cards.
Attributes
id- Unique element ID (required)connections- List of connection maps fromIntegrations.list_connections/1. Each map must have:uuid,:name,:datakeys, and optionally:provider(a provider definition map with:name,:icon,:key).selected- List of currently selected UUIDs (default: [])provider- Filter to only show connections for this provider key (optional)multiple- Allow multiple selection (default: false)searchable- Show search input. Acceptstrue/false/nil.nil(the default) means auto-detect — the search input shows when there are more than 6 connections. Explicitfalsesuppresses it even past the threshold; explicittrueforces it even at small N. Typed:anyin the attr definition because Phoenix's:booleandoesn't admitnil.compact- Use compact card layout (default: false)on_select- Event name sent to parent on selection (required)empty_url- URL for "Add Integration" link shown when no connections exist (optional)class- Additional CSS classes for the wrapper (optional)
Attributes
id(:string) (required)connections(:list) (required)selected(:list) - Defaults to[].provider(:string) - Defaults tonil.multiple(:boolean) - Defaults tofalse.searchable(:any) - Defaults tonil.compact(:boolean) - Defaults tofalse.on_select(:string) (required)empty_url(:string) - Defaults tonil.class(:string) - Defaults to"".search(:string) - Defaults to"".