Skip to main content
@morapay/react is not published yet. This page documents the planned API from sdk/react/README.md. Use @morapay/sdk + MorapayUi.toast() today.

Installation

Peer dependencies: react ≥ 18, react-dom, @morapay/sdk.

MorapayErrorView

Renders nothing when error is null. Reads displayMessage and uiHint from MorapayError:

Placement routing

useMorapayError

Next.js App Router pattern

Server Actions should return serializable error payloads; never throw raw sk_* errors to the client:

Roadmap

  • MorapayErrorView + MorapayErrorModal
  • useMorapayError hook
  • Storybook matrix (severity × placement)
  • Sample integration in sdk/sample/nextjs

Next step

Custom styling: CSS variables and Tailwind className slots.