nebuia-react-component v2.1.7
Nebuia react component
This is a library to integrate Nebuia into your react app.
Installation
npm install nebuia-react-component
Requirements
To use this library you need to have a Nebuia account and a valid API key. You can get this information in the Nebuia dashboard. https://admin.nebuia.com
Usage
import { NebuiaStepsList } from 'nebuia-react-component';
<NebuiaStepsList
enableBackground // Use own background, if false its background is transparent
withDetailsPage // Shows a final page with the report summary
lang="es" // Optional: Language of the component, default is "es", supported languages are "es" and "en"
kyc={REPORT} // Optional: Initialize the component with a report, if not provided it will create a new report
email={EMAIL} // Optional: Initialize the component with an email, if not provided it will ask the user for it
phone={PHONE} // Optional: Initialize the component with a phone, if not provided it will ask the user for it
onFinish={async (report) => {
// When the user finishes the process, this function is called with the report
}}
getKeys={() => {
// Returns the API keys, or a promise that resolves to the API keys
return {
apiKey: 'API_KEY',
apiSecret: 'API_SECRET',
};
}}
/>;
Styles
Global styles
If your aop use another style system other than tailwind, you should import the global styles.
import 'nebuia-react-component/dist/esm/index.css';
Tailwindcss
If your app use tailwind, you can import the tailwind config extending the default styles.
In your tailwind.config.js file add the following:
import { NEBUIA_TAILWIND_CONFIG } from 'nebuia-react-component/dist/tailwind'; // <- Add this line
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"....." // <- Your content
"./node_modules/nebuia-react-component/dist/**/*.{js,ts,jsx,tsx}" // <- Add this line
],
theme: {
...NEBUIA_TAILWIND_CONFIG // <- Add this line
}
};
Also the tailwind form plugin is required, you can install it with:
npm install @tailwindcss/forms
And add it to your tailwind.config.js file:
module.exports = {
plugins: [require('@tailwindcss/forms')],
};
In your index.css file add the following import at the top:
@import 'nebuia-react-component/dist/base.css';
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
8 months ago
5 months ago
5 months ago
8 months ago
5 months ago
5 months ago
5 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
11 months ago
11 months ago
12 months ago
12 months ago