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

1.0.0 • Public • Published

Spindl React Embed Library

Getting Started

  • Run npm i --save @spindl-xyz/embed-react or yarn add @spindl-xyz/embed-react
  • Import the BannerEmbed component and utilize it in your react application
    • Please reach out to us for the proper publisherId, placementId
    • For customization, you can pass in additional styles which will target the returning iframe tag. we recommend adding width and height to desired dimensions

Optional Params

  • address: optional string | string[] but highly encouraged to provide more targeted embeds
  • properties: optional json blob. useful to pass in extra context for user to provide more targeted embeds
import { BannerEmbed } from "@spindl-xyz/embed-react";

const Component = () => {
  return (
    <>
      // ...
      <BannerEmbed
        publisherId="test" // * required
        placementId="1" // * required
        style={{
          width: "970px",
          height: "250px",
        }} // * recommended to add desired width/height
        address={"0x123..."} // can also be passed in an array. i.e. ["0x123", "0x456"]
        properties={{
          userType: "nft",
        }} // optional. you can pass in JSON blob as additional context so we can provide more targeted embeds
      />
    </>
  );
};

Package Sidebar

Install

npm i @spindl-xyz/embed-react

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.63 kB

Total Files

6

Last publish

Collaborators

  • andre_11
  • kunalmodi