Note: You can customize the appearance of the overlay and iFrame to better
match the design of your website. The library uses CSS custom properties that
you can override in your own stylesheet.
Customizing the Overlay
You can customize the overlay by setting CSS custom properties. Here are some examples:Changing the Background Color
You can change the background color of the overlay to make it darker or lighter:Adjusting the Position and Size
The overlay is positioned as a fullscreen fixed element by default. You can adjust the size and position of the survey window, and control layering:Customizing the iFrame
You can also customize the iFrame by adding additional CSS rules. Here are some examples:Changing the Border
You can customize the style of the iFrame in many ways. For example, you can add a border around the iFrame:Customizing the Close Button
You can customize the close button to match your website’s design:Changing the Close Button Style
You can change the appearance of the close button:Customizing the Trigger Button
The library provides a styled button class you can use. You can customize its colors:Responsive Behavior
On smaller screens (under 480px), the survey overlay automatically adjusts to fill the full screen width for a better mobile experience. No additional configuration is needed.Available Properties
Here is a complete list of all the CSS custom properties you can set: Overlay:--primefold-overlay-bg— Background color (default:rgba(0, 0, 0, 0.5))--primefold-overlay-z— Z-index (default:1000)
--primefold-iframe-width— Width (default:80%)--primefold-iframe-height— Height (default:80%)--primefold-iframe-margin— Margin / centering (default:5% auto)--primefold-iframe-radius— Corner radius (default:10px)--primefold-iframe-border— Border (default:none)--primefold-iframe-shadow— Shadow (default:0 0 10px rgba(0, 0, 0, 0.5))
--primefold-close-bg— Background color (default:#f8f8f4)--primefold-close-color— Icon color (default:#1a1917)--primefold-close-shadow— Shadow (default:0 2px 4px rgba(0, 0, 0, 0.2))--primefold-close-size— Width and height (default:40px)--primefold-close-font-size— Icon size (default:24px)--primefold-close-top— Distance from top (default:10px)--primefold-close-right— Distance from right (default:10px)
--primefold-btn-bg— Background color (default:#1a1917)--primefold-btn-color— Text color (default:#f8f8f4)