0.0.3 • Published 2 years ago
@beyondrarity/instacheck-js-test v0.0.3
Beyond Rarity Instacheck Widget - JS Version
You can try a live demo here
Installation
Using NPM:
npm i @beyondrarity/instacheck-js
Using YARN:
yarn add @beyondrarity/instacheck-js
Use Instacheck-JS from CDN
If you don't want to include Instacheck-JS npm package in your project, you can use it from CDN:
<script src="https://cdn.jsdelivr.net/npm/@beyondrarity/instacheck-js-test@0.0.1/dist/index.js"></script>
Usage
Create a container element for the widget and set the needed custom attributes:
<div id="br-instacheck"
collectionId="wallstmoms"
startTokenId="1"
endTokenId="3000"
theme="light"
/>
The container element should have some attributes in order to work:
Attribute | Description | Required |
---|---|---|
collectionId | Your collection slug | yes |
startTokenId | Your collection start token # | yes |
endTokenId | Your collection end token # | yes |
theme | "dark" or "light" | No .Default value is "light" |
Then you can initialize the widget by calling:
BRInstacheck.init("#br-instacheck");
Optionally you can define just the container without extra attributes:
<div id="br-instacheck" />
And use a config object as second parameter on initialization:
BRInstacheck.init("#br-instacheck", {
collectionId: "wallstmoms",
startTokenId: 1,
endTokenId: 3000,
theme: "dark"
});