Squid Dev Documentation
  • Getting Started
    • Overview
    • Get an Integrator ID
    • Integrator Quickstart
  • Widget Integration
    • Add A Widget
      • Swap widget
        • Getting Started
        • Installing the Widget
        • React Installation
        • NextJS Installation
        • Vite Installation
        • Iframe Installation
        • Customization Guide
          • Default User Settings
          • Configuring Content
          • Default Chains and Tokens
          • Configuration Types
          • Collect Fees
        • Information for Integrators
        • Set default chains and tokens via URL
        • Errors
    • Upgrade Your Widget
  • API & SDK Integration
    • API
      • Swap & Bridge Example
      • Staking Example
      • Cross-chain NFT Purchase Example
      • Get Route Status
    • SDK
      • Cross-chain Swap Example
      • Staking Example
      • Cross-chain NFT Purchase Example
      • Get Route Status
    • Key Concepts
      • Route Request Parameters
      • Get a route
      • Execute the route
      • 🪝Hooks
        • How do hooks work
        • Build a preHook
        • Build a postHook
        • Using the full ERC20 or Native balance in a call
        • ❗Transfer the remainder to the user
        • Get a route and execute as normal
      • Express
      • Track status
      • Types
      • Collect Fees
      • Get supported tokens and chains
    • Coral: Intent Swaps
      • Integrating Coral
    • NEW: Bitcoin and Solana
  • Adding Tokens
    • Whitelist a Token
    • Interchain Token(ITS) Listings
      • How To List
    • Circle's EURC Integration Guide
  • Migration
    • Squid v2 vs Squid v1
    • v1 -> v2 Migration
  • Additional Resources
    • Contracts
    • Squid v1 Docs
      • SDK
        • Installing our SDK
        • Get supported tokens and chains
          • Example chains response
          • Example tokens response
        • Set your transfer parameters
        • Get a route
          • Understanding the route response
        • Execute your swap or call
        • Get Route Status
        • Contract calls
          • Code example
          • Creating a ContractCall object
          • Contract call types
          • Approving ERC20s in our multicall
          • Transferring the remainder to a user
        • Collect Fees
          • Fee collector contract addresses
        • Working example!
      • API
        • integratorId
        • API playground
        • Base URLs
        • Get supported tokens and chains
        • Get a route
        • Checking the status of a transaction
        • Error codes
          • V2 API
      • Cosmos
        • Installing our SDK
        • Get supported tokens and chains
          • Example chains response
          • Example tokens response
        • Set your transfer parameters
        • Get a route
          • Cosmos route response
        • Execute your swap or call on Cosmos
        • Get Route Status
        • Cosmos custom calls
        • Working cosmos example!
        • Fallback Addresses
    • Additional Dev Resources
      • Choose How To Integrate Squid
      • Squid x Tenderly
      • Testnet or Mainnet?
      • Understanding Gas Payments
      • Supported Chains and Tokens
      • Request a new supported token
      • Liquidity Sources
        • axlASSET Liquidity
      • Integrator type specific docs
        • DEXs
        • Aggregators
        • NFTs
      • Setting up an EVM signer
      • Setting up Cosmos signer
      • Contract addresses
      • SDK easter eggs
        • Setting toAmount
        • getAllBalances
        • Advanced set up
        • Manually approve a route
        • Manually approve an ERC20
      • Whitelist a token
      • Security & Audits
        • Security
        • Audits
        • Axelar
      • Get an integrator-id
    • Architecture
      • FAQ
      • Liquidity model
      • Architecture
      • General message passing (GMP)
      • Transaction times and fees
      • Fallback behaviour on failed transactions
      • Axelar
    • Brand Assets
      • "Powered by Squid" Policy
    • Audits & Security
    • Contact
  • Changelog
    • SDK
      • v1.3
      • v1.2
    • API
      • v1.9
      • v1.8
      • v1.7
      • v1.6
  • Old v2 Documentation (Deprecated)
    • Whitelist a Token
    • Interchain Token(ITS) Listings
      • How To List
    • Add A Widget
      • Swap widget
        • Getting Started
        • Installing the Widget
        • React Installation
        • NextJS Installation
        • Iframe Installation
        • Customization Guide
          • Default User Settings
          • Theme Customization
          • Configuring Content
          • Default Chains and Tokens
          • Configuration Types
          • Collect fees
        • Information for Integrators
        • Set default chains and tokens via URL
        • Errors
      • Stake widget
        • Installing the Widget
        • Configuration
        • Importing The widget
    • Quick Start
    • API
      • Swap & Bridge Example
      • Staking Example
      • Cross-chain NFT Purchase Example
    • SDK
      • Cross-chain Swap Example
      • Staking Example
      • Cross-chain NFT Purchase Example
    • Key Concepts
      • Route Request Parameters
      • Get a route
      • Execute the route
      • 🪝Hooks
        • How do hooks work
        • Build a preHook
        • Build a postHook
        • Using the full ERC20 or Native balance in a call
        • ❗Transfer the remainder to the user
        • Add your hooks to a route request, or widget
        • Get a route and execute as normal
      • Boost
      • Track status
      • Types
      • Collect Fees
      • Get supported tokens and chains
Powered by GitBook
On this page
  • Squid Widget: Configuring Content Guide
  • Changing the Logo
  • Customizing Title Headings
  • Managing Animations
  • Best Practices
  • Full Example
  1. Widget Integration
  2. Add A Widget
  3. Swap widget
  4. Customization Guide

Configuring Content

Squid Widget: Configuring Content Guide

This guide explains how to customize various content elements of the Squid Widget, including the logo, title headings, and animations.

Changing the Logo

You can set a custom logo for your widget using the mainLogoUrl property:

<SquidWidget
  config={{
    mainLogoUrl: "https://your-domain.com/path-to-your-logo.png"
  }}
/>

Notes:

  • Recommended logo dimensions are 36px x 36px.

  • If this field is empty (""), the logo in the top left corner of the widget will be invisible.

  • Ensure the image URL is accessible and loads quickly for the best user experience.

Customizing Title Headings

You can customize the text for various sections of the widget using the titles property:

<SquidWidget
  config={{
    titles: {
      swap: "Convert",
      settings: "Settings",
      wallets: "Wallets",
      tokens: "Tokens",
      chains: "Networks",
      history: "Transaction History",
      transaction: "Transaction Details",
      destination: "Destination Address",
    }
  }}
/>

Available title customizations:

  • swap: Main action button (default: "Swap")

  • settings: Settings page title

  • wallets: Wallets selection page title

  • tokens: Token selection page title

  • chains: Chain (network) selection page title

  • history: Transaction history page title

  • transaction: Transaction details page title

  • destination: Label for destination address input

Note: If you set any of these strings to an empty value (""), the corresponding title will be invisible.

Managing Animations

The Squid Widget includes custom Lottie animations by default. You can choose to hide these animations:

<SquidWidget
  config={{
    hideAnimations: true
  }}
/>
  • Set hideAnimations to true to disable all custom animations.

  • Set hideAnimations to false (default) to keep the animations enabled.

Best Practices

  1. Consistency: Ensure that your custom content aligns with your brand and the overall user experience of your application.

  2. Localization: Consider providing localized versions of titles if your application supports multiple languages.

  3. Performance: If using a custom logo, optimize the image for web to ensure fast loading times.

  4. Accessibility: When customizing text, maintain clear and descriptive labels to support all users, including those using screen readers.

Full Example

Here's an example that combines all of these content configurations:

import { SquidWidget } from '@0xsquid/widget';

function App() {
  return (
    <SquidWidget
      config={{
        mainLogoUrl: "https://your-domain.com/your-logo.png",
        titles: {
          swap: "Transfer",
          settings: "Preferences",
          wallets: "Connect Wallet",
          tokens: "Select Token",
          chains: "Choose Network",
          history: "Past Transfers",
          transaction: "Transfer Details",
          destination: "Recipient Address",
        },
        hideAnimations: false,
        // ... other configuration options
      }}
    />
  );
}

export default App;
PreviousDefault User SettingsNextDefault Chains and Tokens

Last updated 7 months ago