Skip to main content
Customizing the button style is done differently depending on the JS framework you use.
Change the button to light mode by setting theme as light. Default is dark.

Customizing the button UI in React

Add custom styles to the CrossmintPayButton component using CSS. See the example of the React SDK below and note the className attribute:
Customize the style by modifying the relevant css properties. For example:
Would modify the button’s background color as follows:
change button color in react
Customize the text on the button by adding the property getButtonText and creating an inline function with the following two parameters:
  • connecting: specifies whether the component is loading its packages.
  • paymentMethod: returns the current payment method being used
This setup allows you to control the text depending on the state. For example, the following snippet…
… would result in the following button.
change button color in react