@molecule/app-integration-card-svelte
Feature · integration-card · App (browser) · v1.1.3 · Apache-2.0
Integration / connection card with icon, status, connect/disconnect action
npm install @molecule/app-integration-card-svelteHow it works
@molecule/app-integration-card-svelte is a ready-made integration-card feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
<script lang="ts">
import { IntegrationCard } from '@molecule/app-integration-card-svelte'
</script>
<IntegrationCard
title="Slack"
description="Send notifications to your team channels."
status="disconnected"
action={{
label: 'Connect',
onClick: () => {
window.location.href = '/oauth/slack'
},
}}
dataMolId="slack-integration-card"
/>Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte
Reference
Svelte integration / connection card — the Svelte counterpart of
@molecule/app-integration-card-react, with the same props and the same DOM
for the same input.
Exports IntegrationCard — icon + title + description + status label +
action button. Props: icon?, title, description?, status?
(default 'disconnected'), action? ({ label, onClick?, href?, loading?, disabled? }), variant? ('card' default | 'cta' gradient
promo), className?, dataMolId?.
Use for OAuth/API integrations, bank-connect CTAs, webhook setup cards.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
<script lang="ts">
import { IntegrationCard } from '@molecule/app-integration-card-svelte'
</script>
<IntegrationCard
title="Slack"
description="Send notifications to your team channels."
status="disconnected"
action={{
label: 'Connect',
onClick: () => {
window.location.href = '/oauth/slack'
},
}}
dataMolId="slack-integration-card"
/>
Type
feature
Installation
npm install @molecule/app-integration-card-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
API
Interfaces
IntegrationCardProps
Props for the IntegrationCard component.
interface IntegrationCardProps {
/** Leading icon / logo — a snippet or a plain string. */
icon?: Snippet | string
/** Integration title — a snippet or a plain string. */
title?: Snippet | string
/** Supporting description — a snippet or a plain string. */
description?: Snippet | string
/** Current connection status. Defaults to `'disconnected'`. */
status?: IntegrationStatus
/** Action button configuration. */
action?: {
/** Button label — a snippet or a plain string. */
label?: Snippet | string
/** Click handler (receives the DOM click event, as React's handler does). */
onClick?: (event?: MouseEvent) => void
/** When set, the button renders inside a plain anchor to this URL. */
href?: string
/** While true on the button branch, the label is replaced by an ellipsis glyph. */
loading?: boolean
/** Disables the action. */
disabled?: boolean
} | null
/** `'card'` default, `'cta'` for premium gradient-tinted promos. */
variant?: 'card' | 'cta'
/** Extra classes. */
className?: string
/** `data-mol-id` for AI-agent selectors. */
dataMolId?: string
}
Types
IntegrationStatus
Connection status for an integration.
type IntegrationStatus = 'connected' | 'disconnected' | 'pending' | 'error'
Constants
IntegrationCard
const IntegrationCard: LegacyComponentType
Injection Notes
Requirements
Peer dependencies:
@molecule/app-svelte^3.13.0 || ^4.0.0@molecule/app-ui^1.0.1@molecule/app-ui-svelte^1.1.0svelte^5.0.0
Runtime Dependencies
-
@molecule/app-svelte -
@molecule/app-ui -
@molecule/app-ui-svelte -
svelte -
The status label text ('Connected', 'Connecting…', 'Error', 'Not connected') routes through
t()underintegrationCard.status.*, translated by the@molecule/app-locales-integration-cardcompanion bond. There is no override prop. -
variant="cta"paints an inlinelinear-gradientbackground over the Card usingvar(--color-primary)(falls back to a fixed blue when the theme token is missing). Inline styles beat ClassMap classes, so this overrides the themed card surface; check text contrast against your primary color before using it. -
action.hrefrenders an anchor wrapping the Button and ignoresaction.loading; preferaction.onClickfor anything that needs a loading state. Whileaction.loadingis true the button label is replaced by an ellipsis glyph. -
Node-valued props (
icon,title,description,action.label) are snippets or plain strings. -
Styling resolves through
getClassMap()— wire a ClassMap bond (e.g.@molecule/app-ui-tailwind) before rendering.
Translations
Translation strings are provided by @molecule/app-locales-integration-card.