DEV Community

Cover image for React + TypeScript bindings for Mollie Components / Mollie.js v1.
Exaland Concept (Alexandre)
Exaland Concept (Alexandre)

Posted on

React + TypeScript bindings for Mollie Components / Mollie.js v1.

@exalandapp/react-mollie-components
React + TypeScript bindings for Mollie Components / Mollie.js v1.

This is a community wrapper, not an official Mollie package.

Features

Loads https://js.mollie.com/v1/mollie.js once.
MollieProvider for initialization.
Generic MollieComponent matching mollie.createComponent(type, options).
Shortcuts for card, cardHolder, cardNumber, verificationCode, expiryDate.
React callbacks for change, focus, blur.
useMollieToken() for mollie.createToken().
TypeScript declarations included.
SSR-safe loader: Mollie.js is only loaded in the browser.

Install
npm install @exalandapp/react-mollie-components

Top comments (0)