Tab Docs

Component showcase

Every checkout state, rendered live from the real SDK components — click any card to flip it and see the code.

These are not screenshots — every card below renders the actual components from @runtab/sdk, the same code that runs inside a real checkout. Every value on the cards (amounts, addresses, you@example.com) is sample display data — nothing here touches the network. Use the Code button on any card to flip it and copy the JSX.

PayButton trigger
The idle trigger — the only thing a merchant renders.
PayButton trigger
<PayButton
  apiBaseUrl="https://app.your-tab.example"
  publishableKey="pk_test_…"
  intentUrl="/api/payment-intent"
  onSuccess={(txId, changes) => confirm(txId)}
/>
Flowline
Progress strip — advances only on real checkout events.
Flowline
<Flowline stage="confirming" />
Balance
Real balance read; test mode reads Base Sepolia USDC on-chain.
Balance
<BalanceState
  amount="12.00" balance="20.00"
  merchantName="Museum Shop"
  mode="test" onConfirm={confirm}
/>
Insufficient — test mode
The exact shortfall, plus an in-flow test-funds grant.
Insufficient — test mode
<InsufficientState
  balance="0.00" shortfall="12.00" mode="test"
  onGetTestFunds={claim} onRecheck={recheck}
  onAddFunds={open} onCancel={close}
/>
Add funds
The buyer's real deposit address — selectable, copyable.
Add funds
<AddFundsState
  address="0x1111…1111" mode="test"
  onRecheck={recheck} onCancel={close}
/>
Device approval
A real state, not a failure — continues automatically.
Device approval
<DeviceApprovalState
  email="you@example.com"
  onStartOver={restart}
/>
Processing
Honest loading — no fake progress bars.
Processing
<LoadingState label="Processing your payment…" />
Still working
After 20s confirming: money may be in flight — never claims failure.
Still working
<StuckState onClose={close} />
Success
Receipt with reference code and the stamped 402 → 200.
Success
<SuccessState
  amount="12.00" mode="test"
  refCode="TAB-7K2M9" onDone={close}
/>
Honest error
"Nothing has been charged" — only promised when provably true.
Honest error
<ErrorState
  title="Not enough to complete this payment"
  body="Nothing has been charged."
  onCancel={close} onRetry={retry}
/>

The full interactive checkout — with a real intent, real balance reads, and in-flow test funds — runs at /demo on your app origin.

Theming

Every component above responds to the appearance prop on <PayButton>:

<PayButton
  // …
  appearance={{
    actionColor: "#161310", // primary pay button
    accentColor: "#0e4fd7", // progress / emphasis
  }}
/>

On this page