Gateway Kit

The real Gateway Kit deposit dialog, from the live demo: picking USDC on BSC from a wallet's tokens across chains, entering $3, and reviewing the deposit to Stridge ACME.

Your on-chain app runs on one asset, on one chain — say USDC on Arbitrum. Your users don't. They show up holding ETH on Base, USDT on BNB Smart Chain, whatever the last app paid them. Normally closing that gap is the user's problem: bridge, swap, switch networks, then come back and hope they got it right.

@stridge/gateway-kit (opens in a new tab) closes it for them. It is the React component library for the Stridge Gateway: mount <StridgeProvider /> once, drop in <DepositDialog />, and a user can pay with any token on any supported chain while their own wallet ends up funded with the exact asset your app needs — ready to use, no manual bridging. <WithdrawDialog /> runs the same flow in reverse to cash out.

Activity is the Kit's third flow: a read-only list and receipt view for an owner's deposit, withdrawal, and Cash history. Its built-in dialog uses the owner resolved from a configured Deposit or Withdraw flow. See Provider for that setup.

See it working at demo.stridge.com (opens in a new tab); the headless demo (opens in a new tab) drives the same flows from a custom UI through the Kit's hooks; and Kitweak (opens in a new tab) is a live theme editor for every Kit token — restyle the same widgets in place and export the theme you land on. For worked integrations — a prediction market, a trading app, a DeFi app — see Usecases.

Four integration tiers

The Kit is four concentric APIs over the same FSM, settlement watcher, and design system. Pick how much you want to own — they escalate from "own nothing" to "own everything".

All four tiers reuse the same provider, the same FSM, the same settlement watcher, the same CSS-variable theme — start drop-in and graduate to skin, compound, or headless without rewriting the integration. Tiers also compose — a skinned drop-in stays a drop-in, a skinned compound is the most common production shape, and a headless integration can still reuse the Kit's design tokens for visual consistency. The shadcn registry is the recommended way to bootstrap a compound integration: pnpm dlx shadcn@latest add @stridge/gateway-kit drops the canonical composition into components/stridge/ so you start with files you own and edit.

What's in the box

  • Drop-in dialogs — themed <DepositDialog /> and <WithdrawDialog /> for money flows, plus <ActivityDialog /> for the history list and receipt detail. See Drop-in dialogs.
  • Orchestrated widgets + bare compound parts — Deposit and Withdraw widgets, standalone ActivityList / ActivityDetail widgets, and bare Activity parts for host-owned history. ActivityFlow provides Boundary / Steps / Step routing for controller-backed Activity compositions. See Compound components.
  • Headless hooks — Deposit, Withdraw, and Activity controller, state, and snapshot hooks for teams that render their own UI. See Headless integration.
  • CSS-variable theming — ~80 --stridge-gk-* tokens (color, radius, spacing, typography, motion, shadow) plus four radius presets and an accent runtime override. See Theming & CSS variables.
  • Data-attribute slots — every meaningful element carries a stable data-stridge-slot="<name>" so host CSS can target sub-parts without forking. See Data attributes & slots.
  • shadcn registry — pnpm dlx shadcn@latest add @stridge/gateway-kit --registry https://registry.ui.stridge.com/r drops the kit's composition stubs into components/stridge/. See shadcn registry.
  • i18n — Lingui-backed locales with auto-derived RTL, plus a defineMessages helper for overrides. See Internationalization.
  • Typed event bus — @stridge/gateway-kit/events exports a flow / UI / kit-tier event union and useStridgeFlowEvents for analytics. See Events.
  • UI primitives — @stridge/gateway-kit/ui ships 23 lower-level building blocks (Button, Card, Dialog, Select, AmountInput, TokenLogo, …) you can compose into bespoke UIs. See UI primitives & types.

One provider configures everything

App.tsx
import { StridgeProvider } from "@stridge/gateway-kit"
import { DepositDialog } from "@stridge/gateway-kit/deposit/dialog"

export function App({ userWallet }: { userWallet: `0x${string}` }) {
  return (
    <StridgeProvider
      gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
      // Settlement asset. `networkId` is the Stridge network id — see Supported networks.
      // 9001 = Arbitrum One.
      asset={{ networkId: "9001", symbol: "USDC" }}
      flows={{
        deposit: { destination: { address: userWallet } },
      }}
      appearance={{ accent: "oklch(64.51% 0.19 274.49)", radius: "rounded" }}
    >
      <YourApp />
      <DepositDialog />
    </StridgeProvider>
  )
}

That's the entire wiring. Call useDeposit().open() from any descendant to open the dialog; settle to flows.deposit.destination.address. See Provider for every prop and Installation for the install + stylesheet steps.

Note

The Kit runs client-side, and the gateway key is browser-safe: it is the ID of a live API key with the Gateway scope, not its secret. Lock it down in the kit's Settings in the Stridge Dashboard: a Referrer whitelist restricts which origins may use it, and Destination control limits where funds can settle, either to a fixed list of addresses or, with Require same owner, back to the depositor's own address. See Gateway Kit security for the full model.

Gateway keys are live keys only: a sandbox key gets 403 from the gateway, so the Kit has no sandbox mode.

Where to go next

Was this page helpful?