shipCustomizing Your Perk Frame

This guide will show you how to customize the appearance and placement of your Solana ID Perk Frame to match your brand.

circle-info

Why customize it?

Make it match your brand! Perk Frames need to blend in with your UI.


Overview

The Perk Frame comes with default styling, but you can fully customize it using CSS. You can control:

  • Size and dimensions

  • Colors and backgrounds

  • Button styling

  • Position on the page

  • Which pages it appears on


DOM Structure

Understanding the Perk Frame's structure helps with CSS targeting:

<div class="solana-id-YOUR-AGENT-ID-HERE">
  <div class="wrapper">
    <div class="perk-frame">
    
      <!-- PerkHeader -->
      <div class="perk-frame-header">
        <div class="perk-frame-text">
          <p class="perk-welcome-text">...</p>
          <p class="perk-title">...</p>
        </div>
        <div class="perk-close-btn">...</div>
      </div>
      
      <!-- PerkTicket -->
      <div class="perk-ticket">
        <div class="perk-left">
          <p class="perk-title-gradient">...</p>
          <p class="perk-subtitle-gradient">...</p>
          <div>
            <div class="perk-left-info">
              <img class="perk-ticket-logo" />
              <div class="perk-info-text">
                <p class="perk-info-title">...</p>
                <p class="perk-text-small">...</p>
              </div>
            </div>
          </div>
        </div>
        <div class="perk-right">
          <span class="up-circle circle"></span>
          <span class="down-circle circle"></span>
          <div class="perk-right-info">
            <p class="perk-discount">...</p>
            <p class="perk-off-text">...</p>
          </div>
          <a class="perk-button-link">
            <button class="perk-button">...</button>
          </a>
        </div>
      </div>
      
      <!-- PerkFooter -->
      <div class="perk-footer">
        <p class="perk-powered-by">...</p>
      </div>
      
      <!-- Expandable Content -->
      <div class="perk-expandable-content">
        <hr class="line" />
        <div class="expandable-box">
          <div class="expandable-box-header">
            <div class="expandable-box-header-text">
              <p>...</p>
            </div>
            <div class="expandable-box-icon">...</div>
          </div>
          <div class="expandable-box-content">
            <p>...</p>
          </div>
        </div>
        <div class="expandable-box">...</div>
        <div class="expandable-box">...</div>
        <p class="perk-expandable-content-text">
          ...
          <a class="text-link">...</a>
        </p>
      </div>
      
    </div>
  </div>
</div>

Basic Customization with CSS

Add Custom Styles

Create a CSS file or add styles to your existing stylesheet. All customizations should target the Perk Frame container and its internal classes.

Example: Basic Customization


Controlling Where the Frame Appears

By default, if you add the Perk Frame script globally, it will appear on every page. Here's how to control this:

Show on Homepage Only

For React/Next.js Applications:

For Standard HTML Sites:

Only include the Perk Frame code in your index.html or homepage template:

Show on Multiple Specific Pages

For React/Next.js:

Create a reusable component:

Last updated