███████╗ █████╗ ██████╗ ██╗ ██╗ ██╗ ██╗ ██╗
██╔════╝██╔══██╗██╔══██╗██║ ██║ ██║ ╚██╗ ██╔╝
███████╗███████║██████╔╝██║ ██║ ██║ ╚████╔╝
╚════██║██╔══██║██╔══██╗██║ ██║ ██║ ╚██╔╝
███████║██║ ██║██║ ██║███████╗╚██████╔╝ ██║
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝
React component library for the Sapliy AI-Native Financial Operations Platform.
Sapliy is an AI-native Financial Operations Intelligence Layer that turns business goals into reliable, explainable, auditable financial outcomes — by orchestrating the systems companies already run (Stripe, PayPal, Paddle, HubSpot, Xero), not replacing them.
| Badge | |
|---|---|
| Package | @sapliyio/fintech-ui |
| Version | 1.1.0 |
| License | |
| Build | |
| Peer deps | React ^18 || ^19 |
Legacy package name:
@sapliyio/fintech-uiis the published name, kept for compatibility with the platform's fintech heritage. It is the official Sapliy React component library.
The official React component library for building Sapliy-powered financial UIs. It ships two families of components:
- Foundation & playbook UI —
Button,Card,Badge,Alert,Input,Spinner, plus the human-in-the-loop building blocks of the Sapliy console:ConfidenceBadge,IntentPreviewCard, andDecisionRow. - Payment experiences —
PaymentForm,Checkout, andTransactionTablefor lightweight, self-contained checkout flows.
Everything is themed via CSS variables and consumed through a single SapliyProvider context.
- Playbook components —
ConfidenceBadge,IntentPreviewCard,DecisionRowrender the AI-native explainability layer (confidence gradients, intent previews, audit decisions) - Payment components —
Checkout,PaymentForm,TransactionTablefor embeddable payment UX - Foundation kit —
Button,Card,Badge/StatusBadge,Alert,Input,Spinner/LoadingOverlay,Dialog,ZoneSelector - Theming — CSS variables (
sapliy.css) or astylesconfig object on the provider - TypeScript — full type definitions included
- Storybook — component playground included
npm install @sapliyio/fintech-ui
# or
yarn add @sapliyio/fintech-uiImport the theme CSS once (optional):
@import '@sapliyio/fintech-ui/styles.css';import { SapliyProvider, Card, Button, ConfidenceBadge } from '@sapliyio/fintech-ui';
function App() {
return (
<SapliyProvider config={{ apiKey: 'sk_test_...' }}>
<Card padding="md">
<CardHeader title="Revenue Recovery" subtitle="Dunning playbook status" />
<CardBody>
<ConfidenceBadge value={0.84} showValue />
<Button onClick={() => alert('Run playbook')}>Run Playbook</Button>
</CardBody>
</Card>
</SapliyProvider>
);
}Note:
SapliyProvidertakes aconfigobject ({ apiKey, baseURL?, styles? }) — there is nopublishableKeyprop.
Wraps your app and provides the Sapliy configuration context via useSapliy():
import { SapliyProvider } from '@sapliyio/fintech-ui';
<SapliyProvider
config={{
apiKey: 'sk_test_...', // required
baseURL: 'https://api.sapliy.io', // optional
styles: {
primaryColor: '#6366f1',
borderRadius: '8px',
fontFamily: 'Inter, sans-serif'
}
}}
>
{children}
</SapliyProvider>ConfidenceBadge — the AI-confidence gradient indicator:
import { ConfidenceBadge, confidenceToLevel } from '@sapliyio/fintech-ui';
<ConfidenceBadge value={0.84} showValue size="md" /> // "High · 84%"
<ConfidenceBadge level="low" />
confidenceToLevel(0.9); // 'high'IntentPreviewCard — shows what a goal maps to before anything executes:
import { IntentPreviewCard } from '@sapliyio/fintech-ui';
<IntentPreviewCard
intent="Recover failed subscription payments"
confidence={0.9}
risk="medium"
steps={[
{ id: 's1', title: 'Create Payment Intent', description: 'Amount $19.90', risk: 'low', confidence: 0.95 },
{ id: 's2', title: 'Schedule Dunning Retry', description: 'First retry at ~5h, then days 3/5/7', risk: 'medium', confidence: 0.84 },
]}
/>DecisionRow — a single audit decision (action + reason + policy + confidence):
import { DecisionRow } from '@sapliyio/fintech-ui';
<DecisionRow
eventType="payment.failed"
action="schedule_retry"
reason="First retry in 4–6h (~22% recovery expected)"
policy="dunning-policy"
status="executed"
confidence={0.82}
timestamp="2026-08-19T10:30:00Z"
/>Button — variants primary | secondary | outline | ghost | danger, sizes sm | md | lg:
<Button variant="primary" size="lg" isLoading onClick={handleApprove}>
Approve
</Button>Card — Card, CardHeader, CardBody, CardFooter with variant / padding / rounded:
<Card variant="elevated" padding="lg">
<CardHeader title="Balance" subtitle="Across all zones" action={<Badge>Live</Badge>} />
<CardBody>{/* content */}</CardBody>
<CardFooter align="between">{/* actions */}</CardFooter>
</Card>Badge / StatusBadge — status and risk indicators:
<Badge variant="success" dot>Succeeded</Badge>
<StatusBadge status="failed" />Also exported: Alert, Input, Spinner / LoadingOverlay, Dialog, ZoneSelector.
Checkout — a complete review → pay → success flow:
import { Checkout } from '@sapliyio/fintech-ui';
<Checkout
amount={5000} // amount in cents ($50.00)
currency="USD"
productName="Pro Plan"
onSuccess={(payment) => console.log('Paid:', payment)}
onError={(error) => console.error(error)}
/>PaymentForm — card form backed by the configured apiKey/baseURL:
import { PaymentForm } from '@sapliyio/fintech-ui';
<PaymentForm
amount={2000}
currency="USD"
title="Order #1234"
onSuccess={(response) => console.log('Payment:', response)}
onError={(error) => console.error(error)}
/>TransactionTable — transaction history display:
import { TransactionTable } from '@sapliyio/fintech-ui';
<TransactionTable
transactions={[{ id: 'txn_123', amount: 2000, currency: 'USD', status: 'succeeded', description: 'Order #1234', createdAt: '2026-08-19T10:30:00Z' }]}
onRowClick={(txn) => console.log('Clicked:', txn.id)}
/>The playbook-facing components are built for the three MVP playbooks and the console's human-in-the-loop flow:
- Revenue Recovery & Dunning — surface retry schedules and recovery confidence with
IntentPreviewCard+ConfidenceBadge - Refund & Invoice Orchestration — render policy-gated refund/invoice decisions with
DecisionRow(status:executed | pending | blocked | denied) - Audit Decision Log — render immutable, explainable decisions (action + reason + policy applied) as decision rows
Combine them with Button/Card to build approval centers, playbook dashboards, and audit log views.
Customize with CSS variables:
:root {
--sapliy-primary: #6366f1;
--sapliy-primary-hover: #4f46e5;
--sapliy-success: #22c55e;
--sapliy-error: #ef4444;
--sapliy-border: #e5e7eb;
--sapliy-radius: 8px;
--sapliy-font: 'Inter', sans-serif;
}Or via the styles config on the provider (see SapliyProvider above).
npm run build # tsup + tailwindcss
npm run test # vitest run
npm run test:coverage
npm run lint # eslint src --ext .ts,.tsx
npm run typecheck # tsc --noEmit
npm run storybook # storybook dev -p 6006sapliy-ecosystem— core backend, playbook engine, policy & audit enginessapliy-sdk-node— Node.js SDK (@sapliyio/fintech)sapliy-automation— Sapliy console (prompt-first goal UI, playbooks dashboard)sapliy-testing— shared test kit, playbook fixtures & mocks- Docs — docs.sapliy.io
MIT © Sapliy