clutch-widget-nextjs
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

clutch-widget-nextjs

Module for Clutch widget in Next Js/React environment. Wrap the widget code to iframe.

Installation

npm install clutch-widget-nextjs

Data from Clatch:

scriptIn "string" divIn "string"

Size:

widthIn "string" heightIn "string"

Position:

position "static" | "relative" | "absolute" | "sticky" | "fixed" zIndex "string" leftIn "string" topIn "string" rightIn "string" bottomIn "string"

Title:

title

Background:

background

Default values

scriptIn = "<script></script>", divIn = "<div></div>", widthIn = "0", heightIn = "0", zIndex = "0", leftIn = "auto", topIn = "auto", rightIn = "auto", bottomIn = "auto", title = "Clatch Widget", position = "fixed", background = "rgba(255,255,255,0.8)" sandboxRules = "allow-scripts allow-same-origin allow-popups"

Example:

import { WidgetContainer } from "clutch-widget-nextjs";

<WidgetContainer
    scriptIn={`<script></script>`}
    divIn={`<div></div>`}
    widthIn={"205px"}
    heightIn={"65px"}
    zIndex={"1"}
    leftIn={"auto"}
    bottomIn={"auto"}
    topIn={"10px"}
    rightIn={"auto"}
    position={"absolute"}
    background={"rgba(255,255,255,0.7)"}
    sandboxRules={"allow-scripts allow-same-origin allow-popups"}
/>

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i clutch-widget-nextjs

Weekly Downloads

6

Version

2.0.2

License

MIT

Unpacked Size

7.52 kB

Total Files

6

Last publish

Collaborators

  • eldernv