NiftyKit Docs
WebsiteLaunch AppSign UpDiscord
  • Get Started
    • Introduction
    • Web3 and NFT Basics
    • Getting Started
      • Platform Overview
      • NiftyKit Demo Collection
      • Generating Assets
      • NiftyKit Creator Public Profile
      • File Asset, Size, and Requirements
      • Art Generator Asset Guidelines
    • Pricing
  • NFT Collections
    • What is an NFT Collection?
    • Minting 101
      • Creating Your Own NFT Collection
      • Minting Drop & Dynamic NFTs
      • Airdropping NFTs
      • Minting Open & Limited Editions
    • Collaborations & Shared Collections
      • Revenue Split
        • Split with The Giving Block (Donations Partner)
        • Withdraw Your Revenue Splits
    • Collection Management
      • Importing Assets & Metadata
      • Sales Management
      • Reveal Management
        • Pre-Reveal Placeholder
        • Revealing Your Metadata
      • Post-Drop Management
        • Withdrawing Your Funds
        • Renouncing Your Contract
        • Transfer Ownership of Contract
    • Listing NFTs for Sale
      • Waitlist Management
      • Presale Management
      • Public Sale Management
    • Our Smart Contracts
      • Perfect Abstractions Audit
      • Diamond Smart Contracts
      • Royalties
        • Updating Operator Filter (Blocking Blur and OpenSea)
        • Setting Royalties on NFT Marketplaces
      • Migrating Your Smart Contract to NiftyKit
    • Analytics
    • Troubleshooting
  • Customize Your Experience
    • Introduction
    • NiftyKit Diamond Widgets
      • Available Widgets
        • 🔲Connect Wallet Button
          • ⏳Countdown Timer
        • Drops
          • 🔲Drop Mint Button
          • 🔤Drop Mint Supply Text
          • 🔤Drop Mint Price Text
        • Editions
          • 🔲Edition Mint Button
          • 🔤Edition Mint Supply Text
          • 🔤Edition Mint Price Text
        • Utilities
          • 🛠️Is Connected
          • 🛠️Is Not Connected
          • 🛠️Is Holder
      • Widget Builder
      • Installation Guides
        • 📰Install for WordPress
        • 🌊Install for Webflow
        • 🖌️Install for Wix
        • ◻️Install for Squarespace
    • Available Apps
      • NFT Generator Desktop App
      • Pay What You Want App
      • Crossmint App: Credit Card Minting
      • Augmented Reality App (Token Access)
      • Accept ERC-20
        • Custom ERC-20
      • Generative Collection
      • Soulbound Token
      • Share To Earn
      • ApeCoin
      • Royalty Update
      • Submit an App Request
    • Token Access In Collections
    • Integrate Credit Card Minting
      • Drop Collection Credit Card Integration
      • Edition Collection Credit Card Integration
    • Migrating Your Smart Contract to NiftyKit (via Airdrop)
    • NiftyKit Integration with Farcaster Frames
  • Community
    • Community Guidelines
    • FAQ
    • Meet the Team
    • Contact Info
  • Updates and Changelog
    • Security Report
    • Deprecated features
Powered by GitBook
On this page

Was this helpful?

  1. Customize Your Experience
  2. NiftyKit Diamond Widgets
  3. Available Widgets
  4. Connect Wallet Button

Countdown Timer

PreviousConnect Wallet ButtonNextDrops

Last updated 1 year ago

Was this helpful?

Follow these steps to integrate the countdown timer widget into your website:

  1. Access Your Website's HTML: Open the HTML file of your website where you want to integrate the countdown timer.

  2. Get the following details of your drop:

  • Go to your contract creation txn. This can be accessed in your etherscan.

  • Scroll down and go to click more

  • Click Decode Data

  • Copy Collection ID

Need help with your collection details? Email us at support@niftykit.com or directly ask for help in our chat support on our website.

3, Copy the Code, and Find and Replace it with Your Collection Details:

<!DOCTYPE html>
<html>
<head>
    <title>Countdown Timer</title>
    <style>
        body {
            font-family: "DM Sans", sans-serif;
        }

        .mint-price {
            align-items: center;
        }

        nk-connect-wallet-button::part(wallet-btn-container) {
            margin: 20px auto;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        nk-connect-wallet-button::part(wallet-btn) {
            width: auto;
            height: auto;
            background: #fff;
            border-radius: 80px;
            font-size: 16px;
            padding: 10px 40px;
            color: #000;
        }

        nk-drop-mint-button::part(mint-btn-container) {
            max-width: 200px;
            margin: 20px auto;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 999;
        }

        nk-drop-mint-button::part(mint-btn) {
            height: 40px;
            background: #fff;
            border-radius: 20px;
            border: 1px solid #fff;
        }

        nk-drop-mint-button::part(mint-text) {
            font-size: 14px;
            color: #000;
        }

        nk-drop-mint-button::part(mint-dropdown-icon) {
            width: 32px;
            height: 32px;
            fill: #000;
        }

        #countdownTimer {
            margin-top: 10px; /* Reduced spacing between button and text */
        }
    </style>
</head>
<body>
    <div class="framer-10k6086-container">
        <div style="width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center">
            <script type="module" src="https://sdk.niftykit.com/widgets/widgets.esm.js"></script>

            <nk-diamond collection-id="clrjmbjbv0001109jmix9erk4" class="hydrated">
                <nk-connect-wallet-button class="hydrated">
                    Connect Wallet
                </nk-connect-wallet-button>
                <nk-drop-supply-text>
                    minted / OE <span id="countdownTimer">[Limited Time]</span>
                </nk-drop-supply-text>
                <nk-is-connected class="hydrated">
                    <nk-drop-mint-button success-title="Success!" success-message="You did it! View your Base NFT" success-link="https://app.niftykit.com/collections/base-diamonds" success-link-text="NOW" class="hydrated">
                        Mint NFT
                    </nk-drop-mint-button>
                </nk-is-connected>
            </nk-diamond>
        </div>
    </div>

    <script>
        function updateCountdown() {
            var countdown = document.getElementById("countdownTimer");
            var now = new Date().getTime();
            var countdownDate = new Date("January 28, 2024 10:00:00 PST").getTime();
            var timeLeft = countdownDate - now;

            var days = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
            var hours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            var minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
            var seconds = Math.floor((timeLeft % (1000 * 60)) / 1000);

            countdown.innerHTML = "[" + days + "d " + hours + "h " + minutes + "m " + seconds + "s" + "]";

            if (timeLeft < 0) {
                clearInterval(interval);
                countdown.innerHTML = "[SOLD OUT]";
            }
        }

        var interval = setInterval(updateCountdown, 1000);
    </script>
</body>
</html>
🔲
⏳
https://app.niftykit.com/collections/base-diamonds