Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@xlork/react

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xlork/react

XLork is a powerful Node.js package for parsing and manipulating CSV and XML files. With its intuitive API, XLork makes it easy to read, write, and modify CSV and XML data in your Node.js applications. Whether you're dealing with large datasets or just ne

latest
npmnpm
Version
5.0.2
Version published
Maintainers
1
Created
Source

🚀 XLork Client

XLork Client is a plug-and-play Node.js / React component for integrating the XLork data upload service. Collect, validate, and receive structured data from your users in a beautiful, customizable UI. Install XLork today and start Simplify Data Integration with data onboarding.

NPM Version License: MIT XLork

📦 Installation

npm install @xlork/react

⚡ Quick Start

import React from "react";
import {XlorkClient} from "@xlork/react";

function App() {
	const settings = {
		title: "Upload Your Data",
		columns: [
			{
				label: "Name",
				key: "name",
			},
			{
				label: "Email",
				key: "email",
			},
			{
				label: "DOB",
				key: "date",
				type: "date",
				format: "YYYY-MM-DD",
			},
			{
				label: "Address",
				key: "address",
				validators: {
					required: true,
					error: "Address can not be blank",
				},
			},
			{
				label: "Status",
				key: "status",
				type: "select",
				options: {
					0: "Active",
					1: "Inactive",
					3: "Pending",
				},
			},
			{
				label: "Address Type",
				key: "type",
				type: "dropdown",
				options: ["home", "office"],
				defaultValue: "home",
			},
		],
	};

	const user = {
		email: "user@example.com",
	};

	const handleComplete = (data) => {
		console.log("✅ Upload completed:", data);
	};

	const handleCancel = () => {
		console.log("❌ Upload cancelled");
	};

	return (
		<XlorkClient
			licenseKey="your-license-key"
			user={user}
			settings={settings}
			onComplete={handleComplete}
			onCancel={handleCancel}
		/>
	);
}

export default App;

⚙️ Props

PropTypeRequiredDescription
licenseKeystringYour XLork license key
userobjectUser object with at least an email field
settingsobject⚠️Optional UI & behavior config
onCompletefunction⚠️Callback triggered when upload completes
onCancelfunction⚠️Callback triggered when upload is cancelled
originstringCustom backend URL if self-hosted
childrenReactNodeRender custom trigger (e.g. a button)
loadOnDemandfunctionUse to programmatically trigger upload

🛠️ Settings Object

Customize the behavior and appearance of the upload widget using the settings prop:

{
	title: "Upload Data",         // Form title
	columns: [                    // Field definitions
		{ label: "Name", key: "name" },
		{ label: "Email", key: "email" }
	],
	display: "popup",             // 'popup' or 'inline'
	header: true,                 // Show header text
	branding: false,              // Show 'Powered by XLork'
	history: false,               // Enable upload history
	social: true                  // Show social share options
	allowInvalidSubmit: true,     // Allow submission of invalid records
	theme: null,                  // Custom theme (if available)
	maxRecords: 0,                // 0 means no limit
	sampleUrl: null,              // Optional sample file URL

}

🌟 Features

Easy integration — drop in a component and start accepting data.
Built-in validation — ensure data integrity at source.
Highly customizable — adapt styling, columns, and behavior as needed.
Upload history — users can review their upload sessions (optional).
Supports large data sets — efficiently handles large files.
Self-host or cloud — flexible deployment options.

🧠 Tips & Best Practices

  • Use display: "inline" to embed the uploader into the page.
  • Add sampleUrl to help users with formatting.
  • Use loadOnDemand to decouple the uploader from UI buttons.

📜 License

MIT © Xlork.com

💼 Who’s using XLork?

Companies like Zeo, Konnector, LeadRouter, Dolr.in, and many others trust XLork for their data onboarding needs.

Keywords

react

FAQs

Package last updated on 20 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts