Customization

You can customize the appearance of the pre-built <NekudaPaymentForm> and individual information elements by passing a styles object to the <NekudaWalletProvider>. This allows you to define base styles, as well as styles for specific states (such as focus or error) and individual element types. Refer to the documentation for each element to see available styling selectors and properties.

Building Your Own Form with Individual Elements

For complete control over your information form’s structure and layout, you can import and use individual information elements provided by the SDK. This allows you to arrange fields, add custom labels, and integrate them seamlessly into your existing design. Available elements include:
  • NameElement
  • EmailElement
  • CardNumberElement
  • CardExpiryElement
  • CardCvcElement
Each element component accepts an optional elementId prop.
  • If you provide an elementId, it allows the element to be targeted by instance-specific configurations defined in the <NekudaWalletProvider> (such as custom styles or placeholders via the elements or placeholders props on the Provider). This is useful for advanced customization of specific fields.
  • If you omit the elementId, the element will automatically generate a unique internal ID. It will still inherit type-based styles and global configurations from the Provider but cannot be targeted for instance-specific configurations that rely on a known ID.
All elements also accept style and placeholder props for direct, instance-specific overrides. Each element securely renders an iframe managed by nekuda to handle sensitive data. Remember to:
  • Wrap your custom form component (or its ancestor) with <NekudaWalletProvider>.
  • Use the useNekudaWallet() hook to access elements.submit() for form submission.
  • You can pass options (including style) or a direct placeholder prop to individual elements for element-specific styling or placeholders, overriding global settings from the Provider if needed.

Customizing Card Management

The <NekudaCardManagement> component can be styled to match your application’s design:

Inline Styling

<NekudaCardManagement
  apiService={apiService}
  userId="user_123"
  style={{
    maxWidth: '600px',
    margin: '0 auto',
    fontFamily: '"Inter", sans-serif'
  }}
  className="custom-card-manager"
/>

Custom CSS Classes

You can target specific elements within the card management component:
/* Target the main container */
.custom-card-manager {
  font-family: 'Inter', sans-serif;
}

/* Style card items */
.custom-card-manager .card-item {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.custom-card-manager .card-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Style the default badge */
.custom-card-manager .badge {
  background-color: #10b981;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

/* Style action buttons */
.custom-card-manager button {
  transition: all 0.2s ease;
}

.custom-card-manager button:hover {
  transform: translateY(-1px);
}

Integrating with Your Design System