@cords/react
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@cords/react

The @cords/react package provides a React component for integrating the CORDS widget into your application.

Installation

You can install the SDK using npm or any other package manager:

npm install @cords/react

Usage

To use the CordsWidget component in your React application, you can follow the example provided in the React example package. Here's a brief overview of how to integrate it:

  1. Import the CordsWidget component from @cords/react.
  2. Use the component in your application, providing the necessary prop apiKey

API Key

To receive an api key you must login and copy your key from https://partners.cords.dev

Warning: Your api key should be hidden from git using an environment variable

Example usage:

import { CordsWidget } from "@cords/react";
import React from "react";

function MyApp() {
	const apiKey = "YOUR_API_KEY_HERE"; // Get your API key from https://partners.cords.dev

	return (
		<div>
			<CordsWidget apiKey={apiKey} />
		</div>
	);
}

export default MyApp;

This example demonstrates how to embed a Cords widget into a React application. The CordsWidget component takes care of rendering the widget and handling its interactions seamlessly within your app.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.21latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.21
0.0.10
0.0.00

Package Sidebar

Install

npm i @cords/react

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

13.7 kB

Total Files

10

Last publish

Collaborators

  • billyhawkes