@spindl-xyz/embed-react
v1.0.0
Published
## Getting Started
Downloads
87
Readme
Spindl React Embed Library
Getting Started
- Run
npm i --save @spindl-xyz/embed-react
oryarn 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 addingwidth
andheight
to desired dimensions
- Please reach out to us for the proper
Optional Params
address
: optionalstring | string[]
but highly encouraged to provide more targeted embedsproperties
: 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
/>
</>
);
};