LogoLogo
Manifold for Developers
Manifold for Developers
  • Introduction
  • Shopify Merch Bridge
    • Overview
    • Tutorial
      • Step 1: Product Gate Setup
        • 1.1: Configure the Product
        • 1.2: Install Manifold Merch Bridge
        • 1.2: Create a New Product Gate
        • 1.3: Link a Product to the Gate
        • 1.4: Add Rules
      • Step 2: Store Theme Setup
        • 2.1 The Theme Editor
        • 2.2 Product Page Setup
        • 2.3 Cart Page Setup
    • Advanced Configuration
    • FAQ / Error Help
    • Reference
      • Product and Gate Configuration
        • Shopify Products
        • Product Gates
          • Gate Products
          • Rules
      • Custom Themes
      • Updating to the Latest Version
      • UI Configuration Options
      • Advanced Usage
      • Common Issues
  • Guides
    • Getting Started
    • HTML
    • React
    • NextJS
    • Vue
    • Wix
    • Squarespace
      • Simple Squarespace Site
      • Customised Squarespace Template
  • Resources
    • Apps
      • Grant Types
    • Widgets
      • Directory
      • Manifold CSS Variables
        • Scheme Utility Classes
        • List of Manifold CSS Variables
      • Connect Widget
        • Blockchain Interaction
        • Wallet Authentication
        • Data Client
          • NFT Information Retrieval
            • getNFT
            • getNFTsOfOwner
            • ownerHasNFT
            • getCollectors
          • Data Storage and Retrieval
        • Advanced Configuration
        • Customization & Styling
        • Automatic Error Handling
      • Campaign Widget
        • Campaign Creation
          • Questionnaire
        • Campaign Progress
        • Customization & Styling
      • Curation Widget
      • Marketplace Widgets
        • Widgets
          • Data Attributes
          • Layout Widgets
          • Card Widgets
          • Listing Widgets
        • Window Events
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 3.2.1 - CSS Selector Changes
          • 3.1.1 - CSS Selector Changes
      • Claim Widgets
        • Widgets
          • Data Attributes
          • Complete Claim Widget
          • Buy Button Only Widget
          • Mint Count Widget
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 1.7.0, 1.7.1 - CSS Selector Changes
      • Restricted Token Widget
        • Customization & Styling
      • Wallet Identity Widget
        • Customization & Styling
      • Subscription Widget
      • 6551 Display Widget
    • Manifold Ethereum Provider
  • Tools and APIs
    • Merkle Tree Tool
    • Snapshot Tool
    • Discord Tools
    • Server-Side Session Authentication
      • Signature Grant
      • Authorization Code Grant
  • Smart Contracts
    • Manifold Creator
      • Contracts
        • Creator Core
          • Common Functions
          • ERC721 Functions
          • ERC1155 Functions
        • Extensions
          • Extensions Functions
          • Extensions Examples
          • Extensions Deployment Guide
            • Dynamic NFT Extension
            • Lazy Mint Extension ERC1155
            • Lazy Mint Extension ERC721
        • Mint Permissions
          • Mint Permissions Functions
      • Prior Versions
        • 1.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
        • 2.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
    • Marketplace
      • Identity Verifier
    • Royalty Registry
  • Contact Us
Powered by GitBook
On this page
  • Optional Widget Customizations
  • Styling
  • Manifold CSS Variables

Was this helpful?

  1. Resources
  2. Widgets
  3. Campaign Widget

Customization & Styling

Last updated 2 years ago

Was this helpful?

Optional Widget Customizations

Additional button settings are available out of the box by specifying the following props. Add these in the HTML component covered in the Installation page like so:

<div
      data-widget="m-campaign"
      data-campaign-id="<your campaign id>"
      data-client-id="<your app client id>"
      data-app-name="<your app name>"
      data-network="<your desired network's chain id>"
      data-connect-wallet-text="desired text"
      data-claim-text="desired text"
      data-inner-claim-text="desired text"
></div>

Here are the available button text modification props:

  • data-connect-wallet-text - This is the text shown on the "Claim" button before it is clickable when there is no web3 wallet connection. Currently this defaults to "Connect Wallet" though can sometimes be confusing when implemented as a button. Use this prop to modify it to whatever you'd like.

  • data-claim-text - This is the text shown on the "Claim" button when active (e.g. when web3 wallet is connected). Use this prop to modify to whatever you'd like

  • data-inner-claim-text - This is the button text shown in the widget once an NFT is selected to start the claim process. Currently this defaults to "Claim Here" (see screenshot below). Use this prop to modify it to whatever you'd like

Styling

The Campaign Widget can be styled as desired by modifying the below out-of-the-box SCSS to suit your project. Primary elements are defined below. When building a full custom campaign widget flow be sure to inspect all available elements for other classes within the flow you may like to custom style.

// Out of the box campaign widget styling

<style lang="scss">
  @import "@/scss/_reset.scss"; /* Manifold's opionated reset */
  .m-campaign-button {
    background-color: var(--manifold-theme--color--primary);
    width: 100%;
    height: 100%;
    margin: 0 auto;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14);
    transition: all 0.5s;
    display: flex;
    justify-content: space-between;
    align-items: center;
  
    span {
      color: var(--manifold-text--color--primary);
      text-align: center;
      font-size: 10.5px;
      text-transform: uppercase;
      text-overflow: ellipsis;
  
      &:only-child {
        margin: 0 auto;
      }
    }
  
    &:hover {
      cursor: pointer;
      filter: brightness(0.9);
    }
  
    &:disabled {
      background: #e5e5e5;
      box-shadow: none;
      border-bottom: none;
      pointer-events: none;
  
      span {
        color: #999;
      }
    }
  
    &.success {
      background-color: var(--manifold-theme--color--success);
      border-bottom: 1px solid #4c4;
  
      span {
        color: white;
      }
    }
  
    &.error {
      background-color: var(--manifold-theme--color--error);
      border-bottom: 1px solid #c44;
  
      span {
        color: white;
      }
    }
  
    &.button-loading {
      background-image: linear-gradient(45deg, rgba(40, 40, 150, 0.8), rgba(45, 45, 120, 0.8));
      background-color: rgba(50, 50, 200, 0.5);
      display: flex;
      justify-content: space-between;
      align-items: center;
      pointer-events: none;
      padding: 0 10px;
  
      span {
        text-align: left;
      }
    }
  }
</style>

Manifold CSS Variables

The campaign widget has simplistic dark and light mode styles. By default, it renders according to the end-user's preferred OS colour scheme. The widget can be easily stylized by changing the appropriate Manifold CSS Variables.

This section assumes you have basic HTML and CSS knowledge.

You can also customize the identity widget using the Manifold CSS variables.

The following list of variables are those that have an effect on the identity widget:

  • --manifold-text--font-family--body: sets the font-family of the widget.

  • --manifold-text--font-size--body: sets the font-size of the widget.

  • --manifold-text--color--body: sets the interior text colour.

  • --manifold-page--color--background: sets the background colour of the widget.

  • --manifold-element--color--background: sets the background colour of the form inputs.

  • --manifold-theme--color--primary: sets the colour for the "Submit" and "Edit" buttons.

  • --manifold-theme--color--secondary: sets the colour for the eligible token and already redeemed tabs.

  • --manifold-text--color--primary: sets the inner text colour for the "Submit" and "Edit" buttons.

  • --manifold-text--color--secondary: sets the inner text colour for the eligible token and already redeemed tabs.

  • --manifold-border--color: sets the line colour between cells in the Edit form.