Customize the look and feel of the widget to match the design of your dApp
LI.FI Widget supports visual customization, allowing you to match your web app's design. The widget's layout stays consistent, but you can modify colors, fonts, border radius, container styles, and more.
Start customizing the widget by tweaking some of the following options:
interfaceWidgetConfig {// ...// modifies the style of the container element containerStyle?:CSSProperties;// provides colors, fonts, border-radius theme?:ThemeConfig;// sets default appearance - light, dark, or auto appearance?:Appearance;// disables parts of the UI disabledUI?:DisabledUIType[];// hides parts of the UI hiddenUI?:HiddenUIType[];// makes parts of the UI required requiredUI?:RequiredUIType[];}
Check out our LI.FI Playground to play with customization options in real time.
Container style
Container style can be changed by using the corresponding containerStyle option. In the example below, we adjust border and border-radius properties.
The widget has complete Dark Mode support out of the box. By default, the appearance option is set to auto, matching the user's system settings for dark and light modes. There is also an option to disable UI for manually switching appearance, for example, if your web app only needs dark mode.
Now let's set the default appearance to dark and hide the appearance settings UI.
If you are interested in additional customization options for your service, reach out via our Discord or Partnership page.
As you can see, widget customization is pretty straightforward. We are eager to see what combinations you will come up with while we continue constantly adding new customization options.