Introducing Three Variants for Widget

Apr 26, 2024Release

Image #1

We are excited to announce that our widget now supports three distinct variants, providing developers with greater flexibility to choose the option that best suits their needs. These variants - default (compact), expanded, and full-expanded - offer the same functionality while differing in their design details and size. With this update, developers can experiment with different variants in our playground to determine which one aligns most closely with their requirements.

Supported Variants:

1. Default (Compact)

  • The default variant is designed to be compact, conserving space while maintaining essential functionality.
  • It offers a streamlined appearance, ideal for scenarios where space is limited or a minimalist design is preferred.
  • Despite its compact size, it delivers all core features without sacrificing usability.

2. Expanded

  • The expanded variant provides a balance between compactness and visibility, offering slightly more details than the default version.
  • It enhances user engagement by presenting additional information or options within the widget interface.
  • This variant is suitable for applications where a moderate amount of screen real estate is available, allowing for a more informative presentation without overwhelming the user.

3. Full-Expanded (Wide)

  • The full-expanded variant offers the most comprehensive display, providing users with a rich and immersive experience.
  • It maximizes the use of available space to present a wealth of information or features, making it ideal for applications that prioritize content visibility and interaction.
  • While consuming more screen space, this variant offers unparalleled depth and functionality, catering to users who require extensive details or controls within the widget.

Playground Experimentation:

Developers are encouraged to utilize our playground environment to explore and compare the three variants in real-time.

Image #2

Implementation Details

Developers can utilize the following syntax to integrate the widget into their applications and specify the desired variant:

import { Widget } from "@rango-dev/widget-embedded";

export default function App() {

const config = { // Specify the desired variant here: 'default', 'expanded', or 'full-expanded'

**variant: 'expanded',** 

apiKey: '...', // Your API key

walletConnectProjectId: '...' // Your WalletConnect project ID

}

return (

<div className="App">

  <Widget config={config} />

</div>

);

}