Socket
Socket
Sign inDemoInstall

@cowprotocol/widget-react

Package Overview
Dependencies
Maintainers
5
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cowprotocol/widget-react

CoW Swap Widget Library. Allows you to easily embed a CoW Swap widget on your React application.


Version published
Maintainers
5
Created
Source

CoW Swap React widget

React component that creates a CoW Swap widget. It is based on https://npmjs.com/package/@cowprotocol/widget-lib

Use it

Install dependency

yarn add @cowprotocol/widget-react
npm install @cowprotocol/widget-react

Import component and some convenient types

import { CowSwapWidget, CowSwapWidgetParams } from '@cowprotocol/widget-react'

Prepare the config for the widget:

const cowSwapWidgetParams: CowSwapWidgetParams = {
  appCode: 'NAME-OF-YOU-APP', // Add here the name of your app. e.g. "Pig Swap"
  width: '600px',
  height: '700px',
  tradeType: 'swap',
}

Render the component:

<CowSwapWidget params={cowSwapWidgetParams} />

Developers

# Test
nx test widget-react

# Build the library
nx build widget-react

# Publish to NPM
nx publish widget-react --ver x.y.z --tag latest

Keywords

FAQs

Package last updated on 28 Aug 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc